google-cloud-python icon indicating copy to clipboard operation
google-cloud-python copied to clipboard

BigQuery: add schemaUpdateOptions to LoadJobConfig

Open yan-hic opened this issue 8 years ago • 3 comments

Python 2.7 - Client lib 0.29

Java has it and Go has open request.

As a workaround, one can do as following as the http request is constructed off _properties: LoadJobConfig()._properties.__setitem__('schemaUpdateOptions', [...])

Consider adding to QueryJobConfig too.

yan-hic avatar Jan 10 '18 21:01 yan-hic

@tseaver wrote this answer

@yiga2 FWIW, that feature is marked "experimental" in the docs.

The workaround you propose won't work: instead, I would use:

job_config._properties['schemaUpdateOptions'] = ['ALLOW_FIELD_ADDITION']

chemelnucfin avatar Jan 11 '18 08:01 chemelnucfin

I broke the workaround at https://github.com/GoogleCloudPlatform/google-cloud-python/issues/4728#issuecomment-356857745 in https://github.com/GoogleCloudPlatform/google-cloud-python/pull/5036.

The way to workaround after that change is released will be

job_config._properties['load']['schemaUpdateOptions'] = ['ALLOW_FIELD_ADDITION']

tswast avatar Mar 21 '18 15:03 tswast

Added in https://github.com/GoogleCloudPlatform/google-cloud-python/pull/5415

alixhami avatar Jun 01 '18 23:06 alixhami