I've created a Google BigQuery table with five nested/repeated records,
when I try queries
...bigquery.jobs().query(projectId, queryRequest).execute();...
then
...queryResponse.getRows()...
, BigQuery returns a flat json.
I've seen that the python bq --extract
tool, is able to return pretty well the json.
This json, effectively, is exactly the json that I've loaded.
How is it possible with Java's API?
Can someone help me, please?
Thanks
Onofrio
BigQuery flattens the results of all queries. We've had a feature request for a while to provide the option to not flatten query results, and we may add support for this in the future.
If you want to read nested data from a table, however, you can use bigquery.tabledata().list(...)
, which will return nested/repeated json.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With