I would like to retrieve data from bigquery table executing a select statement from python and using a variable in my where clause. here is my code :
bq_client = Client()
var1 = 'New York'
sql = """
SELECT *
FROM `myTable`
WHERE town = var1
LIMIT 10
"""
df = bq_client.query(sql).to_dataframe()
print(df)
This doesn't work because var1 is not replaced by its value when running