-
Notifications
You must be signed in to change notification settings - Fork 121
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
feat: add support for table snapshot #1320
feat: add support for table snapshot #1320
Conversation
Allows users to generate a persistent copy of an existing table as it were at a given point in time within the same project.
google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/CopyJobConfiguration.java
Outdated
Show resolved
Hide resolved
google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/SnapshotDefinition.java
Outdated
Show resolved
Hide resolved
google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/it/ITBigQueryTest.java
Outdated
Show resolved
Hide resolved
google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/it/ITBigQueryTest.java
Outdated
Show resolved
Hide resolved
google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/it/ITBigQueryTest.java
Outdated
Show resolved
Hide resolved
google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/TableDefinition.java
Show resolved
Hide resolved
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.
Looking much more complete this pass. A couple of minor followups for your consideration.
google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/it/ITBigQueryTest.java
Outdated
Show resolved
Hide resolved
assertTrue(snapshotTable.getDefinition() instanceof SnapshotTableDefinition); | ||
assertEquals(TABLE_SCHEMA, snapshotTable.getDefinition().getSchema()); | ||
assertNotNull(((SnapshotTableDefinition) snapshotTable.getDefinition()).getSnapshotTime()); | ||
assertEquals( |
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.
Any reason you didn't just compare tableIds? Something with relative resolution of project?
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.
Yes, I would get this error if comparing tableIds:
java.lang.AssertionError:
Expected :GenericData{classInfo=[datasetId, projectId, tableId], {datasetId=gcloud_test_dataset_temp_413a3914_e293_4da3_a3cd_e691ba96cdd1, tableId=test_copy_job_base_table}}
Actual :GenericData{classInfo=[datasetId, projectId, tableId], {datasetId=gcloud_test_dataset_temp_413a3914_e293_4da3_a3cd_e691ba96cdd1, projectId=java-docs-samples-testing, tableId=test_copy_job_base_table}}
So I am comparing just the tableNames.
google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/it/ITBigQueryTest.java
Outdated
Show resolved
Hide resolved
Will not merge until this feature is launched. |
🤖 I have created a release \*beep\* \*boop\* --- ## [1.135.0](https://www.github.com/googleapis/java-bigquery/compare/v1.134.1...v1.135.0) (2021-06-28) ### Features * add support for table snapshot ([#1320](https://www.github.com/googleapis/java-bigquery/issues/1320)) ([d783292](https://www.github.com/googleapis/java-bigquery/commit/d783292f4bd2d971235d8afa6318976856529cb5)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
…-processor (#1320) Source-Link: googleapis/synthtool@4b86ab0 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:efbfc5e9ff713005a037941f8ebcc0c69cc630e3ad934675ee26868705a30897
Added support for
operationType
inCopyJobConfiguration.java
and added class support forSnapshotDefinition
.