I have table in bigquery with struct
And problem with iserting data to test record
I try to insert in this way:
query = (
"""
INSERT INTO test.qwe (name, nick, test)
VALUES(@name, @nick, @test)
"""
)
hitTimeStamp = int(time.time())
query_params = [
bigquery.ScalarQueryParameter("name", "STRING", hitTimeStamp),
bigquery.ArrayQueryParameter("nick", "STRING", ["k","TEST"]),
bigquery.StructQueryParameter(
"test",
bigquery.ArrayQueryParameter("a", "STRING", ["adsfwerf","d"]),
bigquery.ArrayQueryParameter("b", "STRING", ["asda","sdfds"]),
),
]
job_config = bigquery.QueryJobConfig()
job_config.query_parameters = query_params
query_job = client.query(
query,
location="US",
job_config=job_config,
)
I expected the data will be inserted! Pls...