Skip to content

Support ignoreUnknownValues and skipInvalidRows option for insertAll#90

Merged
tylertreat merged 2 commits intotylertreat:masterfrom
hagino3000:add_stream_insert_options
Apr 18, 2016
Merged

Support ignoreUnknownValues and skipInvalidRows option for insertAll#90
tylertreat merged 2 commits intotylertreat:masterfrom
hagino3000:add_stream_insert_options

Conversation

@hagino3000
Copy link
Contributor

Now BigQuery support ignoreUnknownValues and skipInvalidRows option for InsertAll.
https://cloud.google.com/bigquery/docs/reference/v2/tabledata/insertAll

I added two options to push_rows method.


def push_rows(self, dataset, table, rows, insert_id_key=None):
def push_rows(self, dataset, table, rows, insert_id_key=None,
skip_invalid_rows=None, ignore_unknown_values=None):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason you default these to None rather than False?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To keep current behavior. Current behavior neither send True nor send False.

@tylertreat
Copy link
Owner

Minor comment, otherwise LGTM. Is this still a WIP?

@tylertreat
Copy link
Owner

Also, maybe want to include the new options in a unit test.

@hagino3000 hagino3000 changed the title [WIP]Support ignoreUnknownValues and skipInvalidRows option for insertAll Support ignoreUnknownValues and skipInvalidRows option for insertAll Apr 18, 2016
@hagino3000
Copy link
Contributor Author

@tylertreat Thanks. I added unit tests and checked actual result of push_rows method to my BigQuery table.

@tylertreat
Copy link
Owner

Thanks!

@tylertreat tylertreat merged commit 2b43879 into tylertreat:master Apr 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants