-
Notifications
You must be signed in to change notification settings - Fork 38
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
Loader is unable to cope with JSON column from postgres #39
Comments
I faced the same Issue |
We should update the jsonschema type translation to properly handle object types. We inherited the translation from the old target bigquery. The only tricky part is that some load methods will load json from a complex object, other methods need the contents of the key to be stringified. |
I'm facing the same issue. Any update or fix on this? Thanks! |
After investigating, I believe the main issue stems from the JSON type column being recognized as both |
I am trying to use this target (via meltano, using most recent releases of both) to process data from postgres (https://github.com/transferwise/pipelinewise-target-postgres), specifically from a table that has two JSON columns,
object
andobject_changes
. The JSON in these columns will always be an object, but otherwise the structure can vary drastically.I've tried to get this table loaded into bigquery using both the
denormalized
andgenerate_view
options separately, but both approaches fail in different ways. If I set bothdenormalized
andgenerate_view
tofalse
, I'm able to load the data fine. I can of course generate my own view, or transform the data in dbt downstream, but would really like to figure out what the issue is here.When using
generate_view
I get this failure:When using
denormalized
I get this failure:I have deleted the bigquery table and meltano state/runs data between invocations, for a clean slate.
I may be misunderstanding the limits of these two different approaches, but it does seem like it should be possible to load postgres JSON columns -> bigquery JSON columns.
Perhaps relatedly, when using
denormalized
the schema that is created in bigquery specifies the mode of both the JSON columns asREPEATED
when I think it should beNULLABLE
, but see no way to configure this. I manually edited the schema in bigquery, changing their mode toNULLABLE
but this didn't fix the problem this loader is encountering - probably because the issue is between this library and the protobuf library, not specifically when hitting the bigquery API.The text was updated successfully, but these errors were encountered: