Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug in BigQuery named parameters, doc example request if it works, or request to fix the bug #621

Open
tx0c opened this issue Mar 7, 2024 · 0 comments

Comments

@tx0c
Copy link

tx0c commented Mar 7, 2024

Is your feature request related to a problem? Please describe.
https://observablehq.com/documentation/misc/standard-library#clientQuery says

BigQuery can use named (@age, @name, …) or ordered (repeating ?) parameters

but it's not true,

tried both dbq.query('SELECT ... @name', [ name ]) which ends up Error: Named parameters are not supported at [33:25];
or dbq.query('SELECT ... @name', { name }) got Error: Bad request,

have to change to the ordered form dbq.query(' SELECT ... ? ', [ name ]) which is the only way can work for now;

Describe the solution you'd like
should support BigQuery named parameters, either dbq.query(' SELECT ... @name ', { name }) or whatever, how can you pass in the named parameters?

many other DB servers also have similar named parameters features, it saves when large chunk of SQL have reference same parameter many times,

the doc page have mentioned Oracle can use named parameters, not sure if all are FALSE for named parameters support?

Oracle can use named (:age, :name, …) or ordered (repeating ?) parameters
SQL Server can use named (@age, @name, …) parameters
@tx0c tx0c changed the title bug and should support BigQuery named parameters bug in BigQuery named parameters Mar 8, 2024
@tx0c tx0c changed the title bug in BigQuery named parameters bug in BigQuery named parameters, doc example request if it works, or request to fix the bug Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant