-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
BigQuery Struct destination nulls out fields in repeated structs #4487
Comments
@ChristopheDuong to add any necessary descriptions/acceptance criteria then triage |
the correctness criterion as described by @zestyping:
From @zestyping's observations, it seems the conversion of the catalog is properly done and tables are well created by: Line 79 in 937f85f
However, populating data into the table may not be done properly, so it should be verified if the formatting of the record data is properly done in: Line 85 in 937f85f
|
Update. |
Update. In the case of processing data from Facebook to BigQuery, we have a gap when we process Array of Objects. |
@zestyping give the new version a shot and let us know how it goes! |
@sherifnada Awesome news. Thanks, will do! |
Environment
Current Behavior
In the Facebook Marketing data, there's a record that contains a field named
targeting
, whose value is a structure containing a field namedexclusions
, whose value is a structure containing a field namedinterests
, whose value is an array of{"id": ..., "name": ...}
structures.I can confirm the data is present because it shows up when I use the original, "flattened" BigQuery destination. When I transfer the data using the flattened BigQuery destination, and then query for the record in BigQuery like this:
...BigQuery gives me this JSON result:
Above you can see the contents of the
targeting
field represented as a JSON string, as you would expect from the normalized BigQuery destination.I've repeated the transfer using the new BigQuery Struct destination, putting the structured data in a dataset named
facebook_struct_raw
. When I look at the results, thetargeting.exclusion.interests
array still contains many elements with the{"id": ..., "name": ...}
shape, but they are full of nulls. If I do a similar query on the structured dataset:...BigQuery gives me this:
So it looks like the structure is accurately preserved, but only the top-level fields contain values, and many (but not all!) of the rest contain nulls.
Expected Behavior
The data values should be preserved in the destination along with the original structure. In other words, the output from the above two queries should represent the same information.
If it helps to specify the correctness criterion in a precise way, I'd say:
Logs
logs-486-0.txt
Steps to Reproduce
Are you willing to submit a PR?
I'm willing to help look into it, but I don't know where to start yet.
The text was updated successfully, but these errors were encountered: