-
Notifications
You must be signed in to change notification settings - Fork 122
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
Postgres bit is a string but converted to Numeric in Bigquery #740
Comments
thanks @AlexStansfield , I'm having a look now. I have to compare this to what the non-fastsync replication is doing and try to get the same result. It should be easy enough with all this detail |
that's strange, I tested
@koszti when I run the tap in discovery mode is not detecting the type of |
sorry for all these messages @AlexStansfield @koszti So what it's really happening is this is trying to load too many bits into a numeric field, not because of the leading zeroes. From what I can see this is affecting all targets, not just BigQuery:
I think if we are going to fix this it makes sense to make the same change in all targets. What do you think? |
I see what you mean about what's causing the error. However I was wondering how a bit like |
@AlexStansfield I'm afraid that's the case. I am collaborating in adding the BigQuery capabilities to PipelineWise, but that exact same replication is done in the other targets. |
@jmriego ran into issues with our bit fields.
As described by postgres a bit field is a string made up on 1s and 0s (https://www.postgresql.org/docs/8.2/datatype-bit.html).
If you have a bit(x) where x > 1 then it's possible you have a value that starts with a 0. However the fastsync to bigquery tries to put it into a NUMERIC field.
That results in issues like this:
Offending line appears to be here:
pipelinewise/pipelinewise/fastsync/postgres_to_bigquery.py
Line 43 in 01613ee
When I changed
NUMERIC
toSTRING
and ran again then all is well.The text was updated successfully, but these errors were encountered: