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

Guidance for typing large numbers in streams' JSON Schemas #349

Closed
MeltyBot opened this issue Mar 25, 2022 · 2 comments
Closed

Guidance for typing large numbers in streams' JSON Schemas #349

MeltyBot opened this issue Mar 25, 2022 · 2 comments

Comments

@MeltyBot
Copy link
Contributor

Migrated from GitLab: https://gitlab.com/meltano/sdk/-/issues/351

Originally created by @aaronsteers on 2022-03-25 15:23:06


We have run into a few cases recently where very large integers or very large currency amounts were being stored as strings in the source API, and the question has come up in a few forms:

Should we type this to an int or numeric type?

How can we avoid overflow downstream if the contents are not expected to fit into a 32-bit structure?

Example from tap-github

MeltanoLabs/tap-github#93 (comment)

@Ry-DS It looks like the API is indeed returning them as strings, but they are clearly integers... Can we force the conversion? Do you get an error?

-> https://api.github.com/repos/facebook/react/events

It makes sense that it's a string as the number is quite large (20 billion) which definitely won't fit in a 32bit signed integer (max 2 billion). I think it's the right move to keep it as strings (it would error out otherwise).

@MeltyBot
Copy link
Contributor Author

@labelsync-manager labelsync-manager bot added the kind/Feature New feature or request label Jun 23, 2022
@stale
Copy link

stale bot commented Jul 18, 2023

This has been marked as stale because it is unassigned, and has not had recent activity. It will be closed after 21 days if no further activity occurs. If this should never go stale, please add the evergreen label, or request that it be added.

@stale stale bot added the stale label Jul 18, 2023
@stale stale bot closed this as completed Aug 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants