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

Numeric: adjust precision handling #1130

Merged
merged 2 commits into from
Jan 23, 2024
Merged

Conversation

Amogh-Bharadwaj
Copy link
Contributor

@Amogh-Bharadwaj Amogh-Bharadwaj commented Jan 23, 2024

200 was being synced as 199.99999999 in initial load for PostgreSQL -> Snowflake. It resided in a numeric column.

Noticed that in ToJSON where we transform numerics and other types for raw table insertion, we set the scale to 9 to conform with the scale value we've chosen for Snowflake for Numeric values (Number(38,9)). And this issue isn't present in CDC.

This PR does the same at processNumeric in the Avro transform step where we write to Avro files

@Amogh-Bharadwaj Amogh-Bharadwaj merged commit b87b251 into main Jan 23, 2024
7 checks passed
@Amogh-Bharadwaj Amogh-Bharadwaj deleted the datatypes/sf-numeric branch January 23, 2024 15:17
Amogh-Bharadwaj added a commit that referenced this pull request Jan 24, 2024
`200` was being synced as `199.99999999` in initial load for PostgreSQL
-> Snowflake. It resided in a numeric column.

Noticed that in ToJSON where we transform numerics and other types for
raw table insertion, we set the scale to 9 to conform with the scale
value we've chosen for Snowflake for Numeric values (Number(38,9)). And
this issue isn't present in CDC.

This PR does the same at `processNumeric` in the Avro transform step
where we write to Avro files
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.

2 participants