Bigquery How to Set Labels

266 views Asked by At

I want to set labels on my query so it will be easy to measure cost at our end so my query looks like this :

SET @@query_label = "ims:pricing_dashboard";
SELECT * FROM `my_bigquery_table` LIMIT 1000; 

Since it's script and all my query are coming from Looker so i can't use the SQL like this ? How i can change my query so i can set query_label and sql will return the result only

1

There are 1 answers

0
Evan James Martin On

On Looker: Edit your database connection > Additional Settings > Additional JDBC parameters

You can add labels to the BigQuery Jobs associated with the LookML components by using JBDC params.

See Looker Google BigQuery Docs, section Job labels and context comments for BigQuery connections