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

[Feature Request]: Expose more query options to bigqueryio for go. #29382

Open
1 of 16 tasks
pdewilde opened this issue Nov 9, 2023 · 2 comments
Open
1 of 16 tasks

[Feature Request]: Expose more query options to bigqueryio for go. #29382

pdewilde opened this issue Nov 9, 2023 · 2 comments

Comments

@pdewilde
Copy link

pdewilde commented Nov 9, 2023

What would you like to happen?

Currently, the only option exposed to users when calling Query() is whether to use StandardSQL or LegacySQL syntax.

This leaves out some important options, the most urgent seems to be QueryParameter. This allows you to safely inject values into a query without opening yourself to a SQL injection attack.

Adding would be simple, a new value could be added to the QueryOptions struct. It could either be the slice []bigquery.QueryParameter exposed in the underlying library's config options, or a custom struct that can be converted.

Once added to QueryOptions, it would need to be used within the Query itself which can be done in the same manner of the existing LegacySQL option

Another option that would be nice to be able to set is dataset id.

I'm willing to submit a PR if its something that sounds helpful.

Issue Priority

Priority: 2 (default / most feature requests should be filed as P2)

Issue Components

  • Component: Python SDK
  • Component: Java SDK
  • Component: Go SDK
  • Component: Typescript SDK
  • Component: IO connector
  • Component: Beam YAML
  • Component: Beam examples
  • Component: Beam playground
  • Component: Beam katas
  • Component: Website
  • Component: Spark Runner
  • Component: Flink Runner
  • Component: Samza Runner
  • Component: Twister2 Runner
  • Component: Hazelcast Jet Runner
  • Component: Google Cloud Dataflow Runner
@pdewilde
Copy link
Author

^^ Feedback welcome. I'll wait until I can actually test this to move out of draft.

@pdewilde
Copy link
Author

.take-issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant