BigQuery: raise TypeError if wrong job_config type is passed to client job methods (load_table_from_*, query, ...) #9480
Labels
api: bigquery
Issues related to the BigQuery API.
type: feature request
‘Nice-to-have’ improvement, new feature or different behavior or design.
Is your feature request related to a problem? Please describe.
It's a somewhat common problem to pass in a
QueryJobConfig
when you meant to create aLoadJobConfig
. (I've done it!) This results in a difficult-to-debug error from the backend:Describe the solution you'd like
Instead, let's catch when someone passes in the wrong type to a
job_config
parameter and raise aValueError
with a more helpful message like:Expected a LoadJobConfig for the job_config parameter, but got job_config=....
Describe alternatives you've considered
Additional context
In response to internal issue 121343256.
The text was updated successfully, but these errors were encountered: