-
Notifications
You must be signed in to change notification settings - Fork 125
BUG: Add support to replace partitions in date-partitioned tables (#43) #124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report
@@ Coverage Diff @@
## master #124 +/- ##
===========================================
- Coverage 75.7% 30.96% -44.75%
===========================================
Files 8 8
Lines 1626 1634 +8
===========================================
- Hits 1231 506 -725
- Misses 395 1128 +733
Continue to review full report at Codecov.
|
19d0d27
to
3a4f4a7
Compare
@@ -699,8 +695,9 @@ def delete_and_recreate_table(self, dataset_id, table_id, table_schema): | |||
table = _Table(self.project_id, dataset_id, | |||
private_key=self.private_key) | |||
table.delete(table_id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this mean that BigQuery lets you delete just a single partition using the table delete operation? I haven't tried that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried it with the decorated table name and it worked as intended.
return True | ||
except NotFound: | ||
return False | ||
except self.http_error as ex: | ||
self.process_http_error(ex) | ||
|
||
def create(self, table_id, schema): | ||
def create(self, table_id, schema, date_partitioned=False): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than pass in date_partitioned
here, I'd like to see an argument similar to the configuration argument in read_gbq
which can take a dictionary in the JSON API format. That way options like timePartitioning
can be set.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes sense to me! I'll look into including the configuration in the to_gbq
call to enable this and rest of the API configuration.
Closing as pandas-gbq has changed quite a bit since this PR was opened. |
Relates to issue #43
Changes:
Needs: