Skip to content
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

Merged
merged 8 commits into from
Jun 28, 2021

Conversation

stephaniewang526
Copy link
Contributor

Added support for operationType in CopyJobConfiguration.java and added class support for SnapshotDefinition.

Allows users to generate a persistent copy of an existing table as it were at a given point in time within the same project.
@stephaniewang526 stephaniewang526 requested review from a team and shollyman May 18, 2021 20:35
@product-auto-label product-auto-label bot added the api: bigquery Issues related to the googleapis/java-bigquery API. label May 18, 2021
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label May 18, 2021
Copy link
Contributor

@shollyman shollyman left a 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.

assertTrue(snapshotTable.getDefinition() instanceof SnapshotTableDefinition);
assertEquals(TABLE_SCHEMA, snapshotTable.getDefinition().getSchema());
assertNotNull(((SnapshotTableDefinition) snapshotTable.getDefinition()).getSnapshotTime());
assertEquals(
Copy link
Contributor

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?

Copy link
Contributor Author

@stephaniewang526 stephaniewang526 Jun 7, 2021

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.

@stephaniewang526 stephaniewang526 added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Jun 8, 2021
@stephaniewang526
Copy link
Contributor Author

Will not merge until this feature is launched.

@stephaniewang526 stephaniewang526 removed the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Jun 28, 2021
@stephaniewang526 stephaniewang526 merged commit d783292 into googleapis:master Jun 28, 2021
gcf-owl-bot bot added a commit that referenced this pull request Jan 10, 2022
…-processor (#1320)

Source-Link: googleapis/synthtool@4b86ab0
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:efbfc5e9ff713005a037941f8ebcc0c69cc630e3ad934675ee26868705a30897
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 googleapis/java-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.

2 participants