You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Switching the query above to this no longer has an error:
# query for row using unnestquery=f"""SELECT event_param.key AS param_key, event_param.value AS param_valueFROM `{table_id}`, UNNEST(event_params) AS event_param"""query_job=client.query(query)
results=query_job.result() # error occurs hereforrowinresults:
print(row)
Something about adding the extra nested value (event_param.value.string_value) results in the error.
The text was updated successfully, but these errors were encountered:
I managed to track the error log to the go-zetasqlite library. It seems like, for some reason, the struct in the event_param.value record is being stored as an array. However, when trying to serialize the value back into a struct this was never supported. I've put a fork together with a change here that unblocks my current workflow. I'm not really sure if this is the correct fix, or maybe the real issue is how this server is passing data to the zetasqlite driver.
What happened?
I've been using this project locally to mock data from the Google Analytics BigQuery export schema. I've noticied one issue when using the following query:
The problem seems to stem from how the
event_params
column is setup. It's an array of nested structs, outlined below in the python example script.What did you expect to happen?
Expected the query to return a value, instead of an error.
How can we reproduce it (as minimally and precisely as possible)?
Use the following python script to reproduce (assuming you have a project called
test-project
and a dataset calledanalytics_0000001
already setup):Anything else we need to know?
Switching the query above to this no longer has an error:
Something about adding the extra nested value (
event_param.value.string_value
) results in the error.The text was updated successfully, but these errors were encountered: