Skip to content

BigQuery: Adds schema update options and snippets#5415

Merged
theacodes merged 8 commits into
googleapis:masterfrom
alixhami:bq-schema-update
May 31, 2018
Merged

BigQuery: Adds schema update options and snippets#5415
theacodes merged 8 commits into
googleapis:masterfrom
alixhami:bq-schema-update

Conversation

@alixhami
Copy link
Copy Markdown
Contributor

No description provided.

@alixhami alixhami added the api: bigquery Issues related to the BigQuery API. label May 30, 2018
@alixhami alixhami requested review from shollyman and tswast May 30, 2018 20:11
@alixhami alixhami requested a review from lukesneeringer as a code owner May 30, 2018 20:11
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label May 30, 2018
Comment thread docs/bigquery/snippets.py Outdated
# dataset_ref = client.dataset('my_dataset')
# filepath = 'path/to/your_file.csv'

table_ref = dataset_ref.table('my_table')

This comment was marked as spam.

Comment thread docs/bigquery/snippets.py Outdated
job_config.schema_update_options = [
bigquery.SchemaUpdateOption.ALLOW_FIELD_RELAXATION,
]
# The source file data to load has one less column than the existing table

This comment was marked as spam.

Comment thread docs/bigquery/snippets.py Outdated
job_config.write_disposition = bigquery.WriteDisposition.WRITE_APPEND

query_job = client.query(
# Write a query that will omit a required field

This comment was marked as spam.

Comment thread docs/bigquery/snippets.py Outdated
bigquery.SchemaField('age', 'INTEGER', mode='REQUIRED'),
]
dest_table = client.create_table(
bigquery.Table(dest_table_ref, schema=schema))

This comment was marked as spam.

@alixhami alixhami requested a review from theacodes May 31, 2018 17:38
@theacodes theacodes merged commit 102f0f8 into googleapis:master May 31, 2018
@alixhami alixhami deleted the bq-schema-update branch May 31, 2018 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: bigquery Issues related to the BigQuery API. cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants