在为bigquery设置参数时,我遇到“无法调用列表对象”的类型错误
title=input()
query = """
SELECT title
FROM `<some BigQuery table>`
WHERE title LIKE '@title' #parameter to pass into the query
ORDER BY title DESC
LIMIT 100;
"""
params=[
bigquery.ScalarQueryParameter('title', 'STRING', title)
]
job_config=bigquery.QueryJobConfig()
job_config.query_parameters=params
query_job=client.query(query,job_config=job_config)
期望运行代码,但出现类型错误:
params=[
bigquery.ScalarQueryParameter('title', 'STRING', title)
]
非常感谢。