Balajee Venkatesh
Balajee Venkatesh

Reputation: 1099

Parameterized queries dealing with Views are not supported

Create View db.test_1 as select * from db.test where yr=@yr;

Running this query is BQ CLI would create the view but when you query this view, execution fails with exception that parameters are not supported. Any insight of doing it?

Upvotes: 1

Views: 1227

Answers (1)

Elliott Brossard
Elliott Brossard

Reputation: 33705

There is currently no way to create a view that takes parameters, also known as a table-valued function. There is an open feature request on the issue tracker to support this functionality, however, and you can follow it for updates.

Upvotes: 1

Related Questions