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

N/A values in numeric fields #85

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mirelagrigoras
Copy link

@mirelagrigoras mirelagrigoras commented Feb 11, 2019

I have been trying to use tap-hubspot with target-postgres, but I had a problem with the integer columns. For fields that have the type 'number', tap-huspot will generate two types for a single field ("number" and "string", in order to accept 'N/A' values : https://github.com/singer-io/tap-hubspot/blob/master/tap_hubspot/__init__.py#L120 ), which is not allowed in a relational database (a column must have a single data type). Generating 2 field types will make target-postgres (or any other sql target) to create 2 columns of different types and different names from the original field name, which will make the import of the hubspot data impossible, since a field should be mapped
to only one column, not to two.
So, my suggestion would be to process the rows as they are received from the APIs calls and replace any 'N/A' values with None, so that the type of a number field could be
"type":[ "null", "number" ].

Let me know if I`m missing something or if I missunderstood anything regarding how tap-hubspot works
Also, if you have any another approach that would solve this problem, I would be more than pleased to hear it.

@cmerrick
Copy link
Contributor

Hi @mirelagrigoras, thanks for your contribution!

In order for us to evaluate and accept your PR, we ask that you sign a contribution license agreement. It's all electronic and will take just minutes.

@cmerrick
Copy link
Contributor

You did it @mirelagrigoras!

Thank you for signing the Singer Contribution License Agreement.

@mirelagrigoras
Copy link
Author

@cmerrick Could you, please, take a look on this pull request?

mdimercurio added a commit to dialoguemd-archives/tap-hubspot that referenced this pull request Jun 1, 2019
* migrate DM NPS survey

* comment question exclusion
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.

3 participants