Closed s7clarke10 closed 8 months ago
Happy with these changes - approving
Perhaps it would be good to review in more detail in future:
It seems there are alternative approaches such as making use of the
sys.columns
view which has specific columns named prec/scale.
Thank you for the review 👍 . I looked at the suggestion around the sys objects rather than the information schema. I think the risk that we have is from a DBA perspective often objects owned by sys are not always granted to most users where as a public view like the information schema is available. As you mentioned we may be able to do some conditional logic to use sys.columns if available. Most likely a public view is more future proof. We can consider other approaches in a future PR.
Overview: The output of Singer Decimal is a string for a numeric column (with hints about the precision and scale) so it can be reconstructed correctly in the target. Singer Decimal - that is output as a string is done to avoid rounding issue in Python and the Singer Framework. It is a safer method as there is no loss in precision.
Problem:
character_maximum_length
in later database versions the maximum allow size in thenumeric_precision
field.Ingestion into target-jsonl would fail due to schema validation failing. Loading into a custom Target Snowflake would fail due to the precision being set to
None
which is an invalid precision.Changes:
character_maximum_length
field in the information schema. If the result isNone
then obtain the precision from thenumeric_precision
field.Results:
Target JSONL
Target Snowflake