-
Notifications
You must be signed in to change notification settings - Fork 50
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
Feature suggestions: Infer DECIMAL
type from multipleOf
#22
Comments
Sorry for late reply @paultiplady. We will discuss this and get back to you. |
No rush! We have a fork that hardcodes a non-generic solution to this issue but would rather be following your repo. |
@paultiplady, we are okay with this change, thank you for your contribution. I merged your Pull Request into a dev branch. We'll test it more, make some tweaks, and do a code review, before we release it. cc @zvizdo |
@paultiplady, we have made some changes to the feature. This branch is currently going through a code review. |
Thank you for your contribution @paultiplady, we have just released your feature. |
Currently there is some support for
bq-decimal
types, but it requires overriding the schema to use non-standard types.#11
Looking at the output from
tap-mysql
, it seems that we could unambiguously identifyNUMERIC
/DECIMAL
(same thing in BQ) by looking at the full schema entry:It seems that if we have a
type=number
that also specifiesmultipleOf
, then you're dealing with aDECIMAL
not a float.The above came from a
`amount` numeric(65, 2) NOT NULL
column, so it seems thattap-mysql
doesn't correctly propagate the digits part, which could in principle be used to inferDECIMAL
vs.BIGDECIMAL
in the BigQuery schema. But for small decimals perhaps it's possible to automatically infer the type more accurately.(I don't know if the
multipleOf
schema is used more widely.)The text was updated successfully, but these errors were encountered: