Is your feature request related to a problem? Please describe.
The code samples for using query parameters are a bit hard to follow because they create several temporary variables.
|
query_params = [ |
|
bigquery.ScalarQueryParameter("corpus", "STRING", "romeoandjuliet"), |
|
bigquery.ScalarQueryParameter("min_word_count", "INT64", 250), |
|
] |
|
job_config = bigquery.QueryJobConfig() |
|
job_config.query_parameters = query_params |
The code samples are still in snippets.py. Ideally these samples would be moved to the samples/ directory.
The code samples supply a location argument for queries, even though this can now be autodetected for queries in all regions.
Describe the solution you'd like
A clear and concise description of what you want to happen.
job_config = bigquery.QueryJobConfig(
query_parameters=[
bigquery.ScalarQueryParameter("corpus", "STRING", "romeoandjuliet"),
bigquery.ScalarQueryParameter("min_word_count", "INT64", 250),
],
)
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
N/A
Additional context
Add any other context or screenshots about the feature request here.
Reported by customer in internal issue 143862711.
Is your feature request related to a problem? Please describe.
The code samples for using query parameters are a bit hard to follow because they create several temporary variables.
google-cloud-python/bigquery/docs/snippets.py
Lines 1868 to 1873 in 518931b
The code samples are still in
snippets.py. Ideally these samples would be moved to thesamples/directory.The code samples supply a
locationargument for queries, even though this can now be autodetected for queries in all regions.Describe the solution you'd like
A clear and concise description of what you want to happen.
bigquery_query_params_...samples to thesamples/directory.locationargument from thequery()method in the moved code samplesquery_parametersargument in the constructor toQueryJobConfig(added in BigQuery: Add properties to job config constructors #6397).Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
N/A
Additional context
Add any other context or screenshots about the feature request here.
Reported by customer in internal issue 143862711.