Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop the decimal and anything after #42

Merged
merged 4 commits into from
Jul 13, 2018
Merged

Conversation

KAllan357
Copy link
Contributor

We've encountered a case where a custom Marketo field is typed as a Percent, which Marketo states:

A percentage expressed as an integer
http://developers.marketo.com/rest-api/lead-database/fields/field-types/

discover.py sets the JSON Schema for percent types to integer: https://github.com/singer-io/tap-marketo/blob/fix-custom-percent-format/tap_marketo/discover.py#L35-L36

Unfortunately, we've seen these values returned with decimal points - ex: '100.0' or '3.2'.

This code will find the decimal point, drop it and set the value up to be converted as per usual. It will also log a message for good measure.

@KAllan357 KAllan357 merged commit dae076e into master Jul 13, 2018
@KAllan357 KAllan357 deleted the fix-custom-percent-format branch July 13, 2018 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant