gcp jupyter use python variables in magic bigquery
params = {'date_str_query': '%-2019-02-%'}
%%bigquery df --params $params
select * from `project.dataset.table`
where date_str like @date_str_query
gcp jupyter use python variables in magic bigquery
params = {'date_str_query': '%-2019-02-%'}
%%bigquery df --params $params
select * from `project.dataset.table`
where date_str like @date_str_query
gcp jupyter use python variables in magic bigquery
date_str_query = '2019-02-%'
sql = """
select * from `project.dataset.table`
where date_str like {0}
""".format(date_str_query)
df = client.query(sql).to_dataframe()
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us