14

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?

dina
  • 4,039
  • 6
  • 39
  • 67
  • 1
    while, as Elliott mentioned, parameters are not supported in Web UI - you can check http://stackoverflow.com/a/42542455/5221944 to see how you can use BigQuery Mate for this – Mikhail Berlyant Mar 06 '17 at 15:52

1 Answers1

18

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.

jwadsack
  • 5,708
  • 2
  • 40
  • 50
Elliott Brossard
  • 32,095
  • 2
  • 67
  • 99