google/cloud-bigquery Does Not Support JSON Columns? #5149
Unanswered
TheFerrettDeveloper
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We have a table with a JSON column, but it produces errors when read through the google/cloud-bigquery.
For example, running this in the BigQuery console...
'SELECT foo FROM
projectid.dataset.tableWHERE DATE(_PARTITIONTIME) <= "2022-01-25" LIMIT 10'
Produces results, where foo is properly identified as a JSON column.
Whereas running this in PHP....
$queryJobConfig = $bigQuery->query(
'SELECT foo FROM
projectid.dataset.tableWHERE DATE(_PARTITIONTIME) <= "2022-01-25" LIMIT 10'
);
$queryResults = $bigQuery->runQuery($queryJobConfig);
Produces this error:
Unrecognized value type JSON. Please ensure you are using the latest version of google/cloud.
Looking deeper into it, the google/cloud-bigquery/src/ValueMapper.php is the source of that error, and indeed, it does not appear to have a TYPE_JSON to convert to data.
So am I correct in assuming that the Google BigQuery SDK doesn't support JSON columns? If that is true, are there plans to add them?
Beta Was this translation helpful? Give feedback.
All reactions