Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to set named parameter on bigquery query

I am trying to use named parameters in my query on bigquery.

@val '123';
SELECT *
FROM [project_id:my_dataset.my_table] 
where name=@val

I get

Encountered " <MAX_TOKEN_VAL> "R "" at line 1, column 2. Was expecting: <EOF>

is there any way to set named parameters on biquery?

like image 674
dina Avatar asked Mar 06 '17 14:03

dina


1 Answers

Named parameters are supported in BigQuery only through the API using standard SQL, not the web UI. You can read about them in the section on Running parameterized queries. If you are interested in web UI support for query parameters, you can star the feature request on the issue tracker.

like image 199
Elliott Brossard Avatar answered Sep 18 '22 06:09

Elliott Brossard