Rawnaq
Rawnaq

Reputation: 31

parametrizing chart in google data lab

I know how to parametrize a single bigquery using %%bq. But how do I then parametrize the %%chart using that bigquery?

When I tried adding a parameter following the guidance in this doc /notebooks/datalab/docs/tutorials/BigQuery/BigQuery%20Parameterization.ipynb (on my datalab instance) it did not work

Upvotes: 1

Views: 136

Answers (1)

Rawnaq
Rawnaq

Reputation: 31

I was able to parametrize queries used in charts using query_name = bq.Query(query_string), which is plain python.

bq is from import google.datalab.bigquery as bq.

%%chart columns --data query_name --fields ... uses the query in query_name.

Upvotes: 2

Related Questions