From 2604a4812e7ce399a3ece3f8887218e271593c30 Mon Sep 17 00:00:00 2001 From: Steffany Brown <30247553+steffnay@users.noreply.github.com> Date: Fri, 20 May 2022 12:32:02 -0700 Subject: [PATCH 01/31] docs(samples): add create_migration_workflow snippet (#71) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs(samples): add handwritten snippet structure * docs(samples): add create_migration_workflow snippet * fix copyright * remove types * lint * cleanup noxfile * enforce type hints * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Update samples/snippets/create_migration_workflow.py Co-authored-by: Anthonios Partheniou * Update samples/snippets/create_migration_workflow.py Co-authored-by: Anthonios Partheniou * pin dependencies * add type annotations Co-authored-by: Anthonios Partheniou Co-authored-by: Owl Bot --- bigquery-migration/snippets/__init__.py | 15 ++++ .../snippets/create_migration_workflow.py | 72 +++++++++++++++++++ .../create_migration_workflow_test.py | 69 ++++++++++++++++++ bigquery-migration/snippets/noxfile_config.py | 38 ++++++++++ .../snippets/requirements-test.txt | 4 ++ bigquery-migration/snippets/requirements.txt | 2 + 6 files changed, 200 insertions(+) create mode 100644 bigquery-migration/snippets/__init__.py create mode 100644 bigquery-migration/snippets/create_migration_workflow.py create mode 100644 bigquery-migration/snippets/create_migration_workflow_test.py create mode 100644 bigquery-migration/snippets/noxfile_config.py create mode 100644 bigquery-migration/snippets/requirements-test.txt create mode 100644 bigquery-migration/snippets/requirements.txt diff --git a/bigquery-migration/snippets/__init__.py b/bigquery-migration/snippets/__init__.py new file mode 100644 index 000000000000..89aac76c1512 --- /dev/null +++ b/bigquery-migration/snippets/__init__.py @@ -0,0 +1,15 @@ +# -*- coding: utf-8 -*- +# +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. diff --git a/bigquery-migration/snippets/create_migration_workflow.py b/bigquery-migration/snippets/create_migration_workflow.py new file mode 100644 index 000000000000..a0ee9cbbac6b --- /dev/null +++ b/bigquery-migration/snippets/create_migration_workflow.py @@ -0,0 +1,72 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# [START bigquery_migration_create_workflow] +def create_migration_workflow( + gcs_input_path: str, gcs_output_path: str, project_id: str +) -> None: + """Creates a migration workflow of a Batch SQL Translation and prints the response.""" + + from google.cloud import bigquery_migration_v2 + + parent = f"projects/{project_id}/locations/us" + + # Construct a BigQuery Migration client object. + client = bigquery_migration_v2.MigrationServiceClient() + + # Set the source dialect to Teradata SQL. + source_dialect = bigquery_migration_v2.Dialect() + source_dialect.teradata_dialect = bigquery_migration_v2.TeradataDialect( + mode=bigquery_migration_v2.TeradataDialect.Mode.SQL + ) + + # Set the target dialect to BigQuery dialect. + target_dialect = bigquery_migration_v2.Dialect() + target_dialect.bigquery_dialect = bigquery_migration_v2.BigQueryDialect() + + # Prepare the config proto. + translation_config = bigquery_migration_v2.TranslationConfigDetails( + gcs_source_path=gcs_input_path, + gcs_target_path=gcs_output_path, + source_dialect=source_dialect, + target_dialect=target_dialect, + ) + + # Prepare the task. + migration_task = bigquery_migration_v2.MigrationTask( + type_="Translation_Teradata2BQ", translation_config_details=translation_config + ) + + # Prepare the workflow. + workflow = bigquery_migration_v2.MigrationWorkflow( + display_name="demo-workflow-python-example-Teradata2BQ" + ) + + workflow.tasks["translation-task"] = migration_task # type: ignore + + # Prepare the API request to create a migration workflow. + request = bigquery_migration_v2.CreateMigrationWorkflowRequest( + parent=parent, + migration_workflow=workflow, + ) + + response = client.create_migration_workflow(request=request) + + print("Created workflow:") + print(response.display_name) + print("Current state:") + print(response.State(response.state)) + + +# [END bigquery_migration_create_workflow] diff --git a/bigquery-migration/snippets/create_migration_workflow_test.py b/bigquery-migration/snippets/create_migration_workflow_test.py new file mode 100644 index 000000000000..cc4b50408a2a --- /dev/null +++ b/bigquery-migration/snippets/create_migration_workflow_test.py @@ -0,0 +1,69 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from typing import Iterable, List, Optional + +from google.api_core.exceptions import ( + InternalServerError, + ServiceUnavailable, + TooManyRequests, +) + +from google.cloud import storage + +import pytest + +from test_utils.retry import RetryErrors +from test_utils.system import unique_resource_id + +from . import create_migration_workflow + +retry_storage_errors = RetryErrors( + (TooManyRequests, InternalServerError, ServiceUnavailable) +) + +storage_client = storage.Client() +PROJECT_ID = storage_client.project + + +def _create_bucket(bucket_name: str, location: Optional[str] = None) -> storage.Bucket: + bucket = storage_client.bucket(bucket_name) + retry_storage_errors(storage_client.create_bucket)(bucket_name, location=location) + + return bucket + + +@pytest.fixture +def buckets_to_delete() -> Iterable[List]: + doomed = [] + yield doomed + for item in doomed: + if isinstance(item, storage.Bucket): + retry_storage_errors(item.delete)(force=True) + + +def test_create_migration_workflow( + capsys: pytest.CaptureFixture, buckets_to_delete: List[storage.Bucket] +) -> None: + bucket_name = "bq_migration_create_workflow_test" + unique_resource_id() + path = f"gs://{PROJECT_ID}/{bucket_name}" + bucket = _create_bucket(bucket_name) + buckets_to_delete.extend([bucket]) + + create_migration_workflow.create_migration_workflow(path, path, PROJECT_ID) + out, _ = capsys.readouterr() + + assert "demo-workflow-python-example-Teradata2BQ" in out + assert "Current state:" in out diff --git a/bigquery-migration/snippets/noxfile_config.py b/bigquery-migration/snippets/noxfile_config.py new file mode 100644 index 000000000000..706b3f3a0be9 --- /dev/null +++ b/bigquery-migration/snippets/noxfile_config.py @@ -0,0 +1,38 @@ +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Default TEST_CONFIG_OVERRIDE for python repos. + +# You can copy this file into your directory, then it will be inported from +# the noxfile.py. + +# The source of truth: +# https://github.com/GoogleCloudPlatform/python-docs-samples/blob/main/noxfile_config.py + +TEST_CONFIG_OVERRIDE = { + # You can opt out from the test for specific Python versions. + "ignored_versions": [], + # Old samples are opted out of enforcing Python type hints + # All new samples should feature them + "enforce_type_hints": True, + # An envvar key for determining the project id to use. Change it + # to 'BUILD_SPECIFIC_GCLOUD_PROJECT' if you want to opt in using a + # build specific Cloud project. You can also use your own string + # to use your own Cloud project. + # "gcloud_project_env": "GOOGLE_CLOUD_PROJECT", + "gcloud_project_env": "GOOGLE_CLOUD_PROJECT", + # A dictionary you want to inject into your test. Don't put any + # secrets here. These values will override predefined values. + "envs": {}, +} diff --git a/bigquery-migration/snippets/requirements-test.txt b/bigquery-migration/snippets/requirements-test.txt new file mode 100644 index 000000000000..a92c4e0979e3 --- /dev/null +++ b/bigquery-migration/snippets/requirements-test.txt @@ -0,0 +1,4 @@ +pytest==6.2.5 +google-cloud-testutils==1.3.0 +google-api-core==2.8.0 +google-cloud-storage==2.0.0 \ No newline at end of file diff --git a/bigquery-migration/snippets/requirements.txt b/bigquery-migration/snippets/requirements.txt new file mode 100644 index 000000000000..ba188d3677c3 --- /dev/null +++ b/bigquery-migration/snippets/requirements.txt @@ -0,0 +1,2 @@ +google-cloud-bigquery-migration==0.4.1 +protobuf==3.19.1 From f4c5a74f4234e53b88d88b6b9ddd14748d2bb8d6 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Sun, 22 May 2022 20:07:18 +0200 Subject: [PATCH 02/31] chore(deps): update all dependencies (#73) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(deps): update all dependencies * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../snippets/create_migration_workflow_test.py | 3 --- bigquery-migration/snippets/requirements-test.txt | 6 +++--- bigquery-migration/snippets/requirements.txt | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/bigquery-migration/snippets/create_migration_workflow_test.py b/bigquery-migration/snippets/create_migration_workflow_test.py index cc4b50408a2a..d687cb649c05 100644 --- a/bigquery-migration/snippets/create_migration_workflow_test.py +++ b/bigquery-migration/snippets/create_migration_workflow_test.py @@ -20,11 +20,8 @@ ServiceUnavailable, TooManyRequests, ) - from google.cloud import storage - import pytest - from test_utils.retry import RetryErrors from test_utils.system import unique_resource_id diff --git a/bigquery-migration/snippets/requirements-test.txt b/bigquery-migration/snippets/requirements-test.txt index a92c4e0979e3..1e5f4d823f64 100644 --- a/bigquery-migration/snippets/requirements-test.txt +++ b/bigquery-migration/snippets/requirements-test.txt @@ -1,4 +1,4 @@ -pytest==6.2.5 -google-cloud-testutils==1.3.0 +pytest==7.1.2 +google-cloud-testutils==1.3.1 google-api-core==2.8.0 -google-cloud-storage==2.0.0 \ No newline at end of file +google-cloud-storage==2.3.0 \ No newline at end of file diff --git a/bigquery-migration/snippets/requirements.txt b/bigquery-migration/snippets/requirements.txt index ba188d3677c3..513228d23a48 100644 --- a/bigquery-migration/snippets/requirements.txt +++ b/bigquery-migration/snippets/requirements.txt @@ -1,2 +1,2 @@ google-cloud-bigquery-migration==0.4.1 -protobuf==3.19.1 +protobuf==3.20.1 From 89d7c575b6f7c7285062fff6d5368ea97c160478 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 25 May 2022 19:33:31 +0200 Subject: [PATCH 03/31] chore(deps): update dependency google-cloud-bigquery-migration to v0.4.2 (#74) --- bigquery-migration/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bigquery-migration/snippets/requirements.txt b/bigquery-migration/snippets/requirements.txt index 513228d23a48..311dc82ca24c 100644 --- a/bigquery-migration/snippets/requirements.txt +++ b/bigquery-migration/snippets/requirements.txt @@ -1,2 +1,2 @@ -google-cloud-bigquery-migration==0.4.1 +google-cloud-bigquery-migration==0.4.2 protobuf==3.20.1 From cd5db84063d6ac44570977fc229a5510ad980669 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 27 May 2022 19:58:43 +0200 Subject: [PATCH 04/31] chore(deps): update all dependencies (#93) * chore(deps): update all dependencies * revert protobuf Co-authored-by: Anthonios Partheniou --- bigquery-migration/snippets/requirements-test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bigquery-migration/snippets/requirements-test.txt b/bigquery-migration/snippets/requirements-test.txt index 1e5f4d823f64..1fa6eb09a400 100644 --- a/bigquery-migration/snippets/requirements-test.txt +++ b/bigquery-migration/snippets/requirements-test.txt @@ -1,4 +1,4 @@ pytest==7.1.2 google-cloud-testutils==1.3.1 -google-api-core==2.8.0 +google-api-core==2.8.1 google-cloud-storage==2.3.0 \ No newline at end of file From 76b97a2b71b93d43876b395b83b8da9379281054 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 2 Aug 2022 16:48:18 +0200 Subject: [PATCH 05/31] chore(deps): update all dependencies (#111) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(deps): update all dependencies * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * revert * remove protobuf Co-authored-by: Owl Bot Co-authored-by: Anthonios Partheniou --- bigquery-migration/snippets/requirements-test.txt | 6 +++--- bigquery-migration/snippets/requirements.txt | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/bigquery-migration/snippets/requirements-test.txt b/bigquery-migration/snippets/requirements-test.txt index 1fa6eb09a400..a9eb57f532da 100644 --- a/bigquery-migration/snippets/requirements-test.txt +++ b/bigquery-migration/snippets/requirements-test.txt @@ -1,4 +1,4 @@ pytest==7.1.2 -google-cloud-testutils==1.3.1 -google-api-core==2.8.1 -google-cloud-storage==2.3.0 \ No newline at end of file +google-cloud-testutils==1.3.3 +google-api-core==2.8.2 +google-cloud-storage==2.4.0 \ No newline at end of file diff --git a/bigquery-migration/snippets/requirements.txt b/bigquery-migration/snippets/requirements.txt index 311dc82ca24c..bafdc5441d7b 100644 --- a/bigquery-migration/snippets/requirements.txt +++ b/bigquery-migration/snippets/requirements.txt @@ -1,2 +1 @@ -google-cloud-bigquery-migration==0.4.2 -protobuf==3.20.1 +google-cloud-bigquery-migration==0.6.0 From d7fb80fb4abb4191e305cdb2c2e20e5297dc572b Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 5 Aug 2022 21:33:29 +0200 Subject: [PATCH 06/31] chore(deps): update all dependencies (#113) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(deps): update all dependencies * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * revert Co-authored-by: Owl Bot Co-authored-by: Anthonios Partheniou --- bigquery-migration/snippets/requirements-test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bigquery-migration/snippets/requirements-test.txt b/bigquery-migration/snippets/requirements-test.txt index a9eb57f532da..bdc49f7e6fe0 100644 --- a/bigquery-migration/snippets/requirements-test.txt +++ b/bigquery-migration/snippets/requirements-test.txt @@ -1,4 +1,4 @@ pytest==7.1.2 google-cloud-testutils==1.3.3 google-api-core==2.8.2 -google-cloud-storage==2.4.0 \ No newline at end of file +google-cloud-storage==2.5.0 \ No newline at end of file From 3697ef4c04f62aec5c2203feb1066246e7026e59 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 16 Aug 2022 16:16:35 +0200 Subject: [PATCH 07/31] chore(deps): update dependency google-cloud-bigquery-migration to v0.7.0 (#120) --- bigquery-migration/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bigquery-migration/snippets/requirements.txt b/bigquery-migration/snippets/requirements.txt index bafdc5441d7b..8c472d3968c3 100644 --- a/bigquery-migration/snippets/requirements.txt +++ b/bigquery-migration/snippets/requirements.txt @@ -1 +1 @@ -google-cloud-bigquery-migration==0.6.0 +google-cloud-bigquery-migration==0.7.0 From f22d37eb054799d2da6698f9feef68fdde99df08 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 2 Sep 2022 13:14:51 +0200 Subject: [PATCH 08/31] chore(deps): update dependency google-api-core to v2.10.0 (#126) * chore(deps): update dependency google-api-core to v2.10.0 * revert Co-authored-by: Anthonios Partheniou --- bigquery-migration/snippets/requirements-test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bigquery-migration/snippets/requirements-test.txt b/bigquery-migration/snippets/requirements-test.txt index bdc49f7e6fe0..82488b3c344c 100644 --- a/bigquery-migration/snippets/requirements-test.txt +++ b/bigquery-migration/snippets/requirements-test.txt @@ -1,4 +1,4 @@ pytest==7.1.2 google-cloud-testutils==1.3.3 -google-api-core==2.8.2 +google-api-core==2.10.0 google-cloud-storage==2.5.0 \ No newline at end of file From e1bc98952a01e42a6352105becdcf03a556ddbab Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 6 Sep 2022 17:51:04 +0200 Subject: [PATCH 09/31] chore(deps): update dependency pytest to v7.1.3 (#130) * chore(deps): update all dependencies * revert Co-authored-by: Anthonios Partheniou --- bigquery-migration/snippets/requirements-test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bigquery-migration/snippets/requirements-test.txt b/bigquery-migration/snippets/requirements-test.txt index 82488b3c344c..ec5c85e48050 100644 --- a/bigquery-migration/snippets/requirements-test.txt +++ b/bigquery-migration/snippets/requirements-test.txt @@ -1,4 +1,4 @@ -pytest==7.1.2 +pytest==7.1.3 google-cloud-testutils==1.3.3 google-api-core==2.10.0 google-cloud-storage==2.5.0 \ No newline at end of file From 643ee6033184e8e058fb102eedab71269e1908cc Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 14 Sep 2022 19:48:09 +0200 Subject: [PATCH 10/31] chore(deps): update dependency google-api-core to v2.10.1 (#135) --- bigquery-migration/snippets/requirements-test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bigquery-migration/snippets/requirements-test.txt b/bigquery-migration/snippets/requirements-test.txt index ec5c85e48050..0819da27c644 100644 --- a/bigquery-migration/snippets/requirements-test.txt +++ b/bigquery-migration/snippets/requirements-test.txt @@ -1,4 +1,4 @@ pytest==7.1.3 google-cloud-testutils==1.3.3 -google-api-core==2.10.0 +google-api-core==2.10.1 google-cloud-storage==2.5.0 \ No newline at end of file From e89ad5209ebfa3c96c01a2f9f0dc3bae0e8e022d Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 4 Oct 2022 15:32:30 +0200 Subject: [PATCH 11/31] chore(deps): update dependency google-cloud-bigquery-migration to v0.7.1 (#138) --- bigquery-migration/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bigquery-migration/snippets/requirements.txt b/bigquery-migration/snippets/requirements.txt index 8c472d3968c3..ebf8b62c4651 100644 --- a/bigquery-migration/snippets/requirements.txt +++ b/bigquery-migration/snippets/requirements.txt @@ -1 +1 @@ -google-cloud-bigquery-migration==0.7.0 +google-cloud-bigquery-migration==0.7.1 From 657bda80e43bac3eaef95c727dbcb90851121e14 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Sat, 8 Oct 2022 19:49:59 +0200 Subject: [PATCH 12/31] chore(deps): update dependency google-api-core to v2.10.2 (#141) --- bigquery-migration/snippets/requirements-test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bigquery-migration/snippets/requirements-test.txt b/bigquery-migration/snippets/requirements-test.txt index 0819da27c644..6d02f96c2722 100644 --- a/bigquery-migration/snippets/requirements-test.txt +++ b/bigquery-migration/snippets/requirements-test.txt @@ -1,4 +1,4 @@ pytest==7.1.3 google-cloud-testutils==1.3.3 -google-api-core==2.10.1 +google-api-core==2.10.2 google-cloud-storage==2.5.0 \ No newline at end of file From 5be63cbdbc9d504e556d8078bcb02f696db6e596 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 10 Oct 2022 20:16:26 +0200 Subject: [PATCH 13/31] chore(deps): update dependency google-cloud-bigquery-migration to v0.7.2 (#142) --- bigquery-migration/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bigquery-migration/snippets/requirements.txt b/bigquery-migration/snippets/requirements.txt index ebf8b62c4651..2362fdb88d03 100644 --- a/bigquery-migration/snippets/requirements.txt +++ b/bigquery-migration/snippets/requirements.txt @@ -1 +1 @@ -google-cloud-bigquery-migration==0.7.1 +google-cloud-bigquery-migration==0.7.2 From 84440578b13b55db538b85d600e7e24f45abd392 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 26 Oct 2022 12:53:49 +0200 Subject: [PATCH 14/31] chore(deps): update dependency pytest to v7.2.0 (#143) --- bigquery-migration/snippets/requirements-test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bigquery-migration/snippets/requirements-test.txt b/bigquery-migration/snippets/requirements-test.txt index 6d02f96c2722..e615ea6525b6 100644 --- a/bigquery-migration/snippets/requirements-test.txt +++ b/bigquery-migration/snippets/requirements-test.txt @@ -1,4 +1,4 @@ -pytest==7.1.3 +pytest==7.2.0 google-cloud-testutils==1.3.3 google-api-core==2.10.2 google-cloud-storage==2.5.0 \ No newline at end of file From bfbcea70081b8f48699e3f842d5dd404e187614b Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Mon, 21 Nov 2022 17:52:36 +0100 Subject: [PATCH 15/31] chore(deps): update dependency google-cloud-storage to v2.6.0 (#146) Co-authored-by: Anthonios Partheniou --- bigquery-migration/snippets/requirements-test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bigquery-migration/snippets/requirements-test.txt b/bigquery-migration/snippets/requirements-test.txt index e615ea6525b6..332e3592889b 100644 --- a/bigquery-migration/snippets/requirements-test.txt +++ b/bigquery-migration/snippets/requirements-test.txt @@ -1,4 +1,4 @@ pytest==7.2.0 google-cloud-testutils==1.3.3 google-api-core==2.10.2 -google-cloud-storage==2.5.0 \ No newline at end of file +google-cloud-storage==2.6.0 \ No newline at end of file From 6f9eab423952122da23bea15412bb442c5c55183 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 15 Dec 2022 22:53:16 +0100 Subject: [PATCH 16/31] chore(deps): update dependency google-api-core to v2.11.0 (#151) Co-authored-by: Anthonios Partheniou --- bigquery-migration/snippets/requirements-test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bigquery-migration/snippets/requirements-test.txt b/bigquery-migration/snippets/requirements-test.txt index 332e3592889b..a3af80f12642 100644 --- a/bigquery-migration/snippets/requirements-test.txt +++ b/bigquery-migration/snippets/requirements-test.txt @@ -1,4 +1,4 @@ pytest==7.2.0 google-cloud-testutils==1.3.3 -google-api-core==2.10.2 +google-api-core==2.11.0 google-cloud-storage==2.6.0 \ No newline at end of file From 2fddf56b09049123f45c97c1a5d5f459aae8ff46 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 15 Dec 2022 23:12:21 +0100 Subject: [PATCH 17/31] chore(deps): update dependency google-cloud-storage to v2.7.0 (#154) --- bigquery-migration/snippets/requirements-test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bigquery-migration/snippets/requirements-test.txt b/bigquery-migration/snippets/requirements-test.txt index a3af80f12642..deed7352ee73 100644 --- a/bigquery-migration/snippets/requirements-test.txt +++ b/bigquery-migration/snippets/requirements-test.txt @@ -1,4 +1,4 @@ pytest==7.2.0 google-cloud-testutils==1.3.3 google-api-core==2.11.0 -google-cloud-storage==2.6.0 \ No newline at end of file +google-cloud-storage==2.7.0 \ No newline at end of file From dd1a16422f529b97ecaa22c220360215bd9a9f66 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Fri, 16 Dec 2022 03:27:46 +0100 Subject: [PATCH 18/31] chore(deps): update dependency google-cloud-bigquery-migration to v0.8.0 (#155) --- bigquery-migration/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bigquery-migration/snippets/requirements.txt b/bigquery-migration/snippets/requirements.txt index 2362fdb88d03..8c3286d2ca09 100644 --- a/bigquery-migration/snippets/requirements.txt +++ b/bigquery-migration/snippets/requirements.txt @@ -1 +1 @@ -google-cloud-bigquery-migration==0.7.2 +google-cloud-bigquery-migration==0.8.0 From 46a18a6d53dac6629db9a76d0aa3039b375c4e4b Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 11 Jan 2023 17:10:47 +0000 Subject: [PATCH 19/31] chore(deps): update dependency google-cloud-bigquery-migration to v0.9.0 (#159) --- bigquery-migration/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bigquery-migration/snippets/requirements.txt b/bigquery-migration/snippets/requirements.txt index 8c3286d2ca09..3dae9dda56d7 100644 --- a/bigquery-migration/snippets/requirements.txt +++ b/bigquery-migration/snippets/requirements.txt @@ -1 +1 @@ -google-cloud-bigquery-migration==0.8.0 +google-cloud-bigquery-migration==0.9.0 From aef0887e30a250be4e7b0299a25a665c4fa9f21c Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Sat, 14 Jan 2023 18:13:26 +0000 Subject: [PATCH 20/31] chore(deps): update dependency pytest to v7.2.1 (#160) --- bigquery-migration/snippets/requirements-test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bigquery-migration/snippets/requirements-test.txt b/bigquery-migration/snippets/requirements-test.txt index deed7352ee73..f3ea4a896b72 100644 --- a/bigquery-migration/snippets/requirements-test.txt +++ b/bigquery-migration/snippets/requirements-test.txt @@ -1,4 +1,4 @@ -pytest==7.2.0 +pytest==7.2.1 google-cloud-testutils==1.3.3 google-api-core==2.11.0 google-cloud-storage==2.7.0 \ No newline at end of file From 791ab4ad9e087ebf46f2247bd8e3f9ffd2a28958 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Mon, 23 Jan 2023 16:36:39 +0000 Subject: [PATCH 21/31] chore(deps): update dependency google-cloud-bigquery-migration to v0.9.1 (#163) --- bigquery-migration/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bigquery-migration/snippets/requirements.txt b/bigquery-migration/snippets/requirements.txt index 3dae9dda56d7..9816067cd1a4 100644 --- a/bigquery-migration/snippets/requirements.txt +++ b/bigquery-migration/snippets/requirements.txt @@ -1 +1 @@ -google-cloud-bigquery-migration==0.9.0 +google-cloud-bigquery-migration==0.9.1 From 76da3d5df39808008db042020e5767a16b6dada1 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 1 Mar 2023 20:42:41 +0000 Subject: [PATCH 22/31] chore(deps): update dependency google-cloud-bigquery-migration to v0.10.0 (#172) --- bigquery-migration/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bigquery-migration/snippets/requirements.txt b/bigquery-migration/snippets/requirements.txt index 9816067cd1a4..734c5906d4cd 100644 --- a/bigquery-migration/snippets/requirements.txt +++ b/bigquery-migration/snippets/requirements.txt @@ -1 +1 @@ -google-cloud-bigquery-migration==0.9.1 +google-cloud-bigquery-migration==0.10.0 From 92e58f69f3e0cae8f70a86637c71bdc699e4b403 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Sat, 4 Mar 2023 11:30:10 +0000 Subject: [PATCH 23/31] chore(deps): update dependency pytest to v7.2.2 (#173) --- bigquery-migration/snippets/requirements-test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bigquery-migration/snippets/requirements-test.txt b/bigquery-migration/snippets/requirements-test.txt index f3ea4a896b72..229704ff60a1 100644 --- a/bigquery-migration/snippets/requirements-test.txt +++ b/bigquery-migration/snippets/requirements-test.txt @@ -1,4 +1,4 @@ -pytest==7.2.1 +pytest==7.2.2 google-cloud-testutils==1.3.3 google-api-core==2.11.0 google-cloud-storage==2.7.0 \ No newline at end of file From 84cbefc0d9d965fd5311eb4016eef0c1aaac0663 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Tue, 28 Mar 2023 23:44:47 +0100 Subject: [PATCH 24/31] chore(deps): update dependency google-cloud-bigquery-migration to v0.11.0 (#178) --- bigquery-migration/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bigquery-migration/snippets/requirements.txt b/bigquery-migration/snippets/requirements.txt index 734c5906d4cd..9eacdfaa18a3 100644 --- a/bigquery-migration/snippets/requirements.txt +++ b/bigquery-migration/snippets/requirements.txt @@ -1 +1 @@ -google-cloud-bigquery-migration==0.10.0 +google-cloud-bigquery-migration==0.11.0 From 3590d9bc60d4234c8f0229b9eaebdc022811895b Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 6 Apr 2023 17:16:31 +0100 Subject: [PATCH 25/31] chore(deps): update dependency google-cloud-storage to v2.8.0 (#179) --- bigquery-migration/snippets/requirements-test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bigquery-migration/snippets/requirements-test.txt b/bigquery-migration/snippets/requirements-test.txt index 229704ff60a1..a946e11acf13 100644 --- a/bigquery-migration/snippets/requirements-test.txt +++ b/bigquery-migration/snippets/requirements-test.txt @@ -1,4 +1,4 @@ pytest==7.2.2 google-cloud-testutils==1.3.3 google-api-core==2.11.0 -google-cloud-storage==2.7.0 \ No newline at end of file +google-cloud-storage==2.8.0 \ No newline at end of file From cef10fcfff610eccb3a7903297b2329ff39f50ce Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Sat, 15 Apr 2023 15:43:58 +0100 Subject: [PATCH 26/31] chore(deps): update dependency pytest to v7.3.1 (#180) --- bigquery-migration/snippets/requirements-test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bigquery-migration/snippets/requirements-test.txt b/bigquery-migration/snippets/requirements-test.txt index a946e11acf13..d59e8286ba98 100644 --- a/bigquery-migration/snippets/requirements-test.txt +++ b/bigquery-migration/snippets/requirements-test.txt @@ -1,4 +1,4 @@ -pytest==7.2.2 +pytest==7.3.1 google-cloud-testutils==1.3.3 google-api-core==2.11.0 google-cloud-storage==2.8.0 \ No newline at end of file From 355384319028361f48c480f1a32b13070bd3f018 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 1 Jun 2023 12:33:47 +0200 Subject: [PATCH 27/31] chore(deps): update dependency google-cloud-storage to v2.9.0 (#184) Co-authored-by: Anthonios Partheniou --- bigquery-migration/snippets/requirements-test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bigquery-migration/snippets/requirements-test.txt b/bigquery-migration/snippets/requirements-test.txt index d59e8286ba98..7fedba1b2528 100644 --- a/bigquery-migration/snippets/requirements-test.txt +++ b/bigquery-migration/snippets/requirements-test.txt @@ -1,4 +1,4 @@ pytest==7.3.1 google-cloud-testutils==1.3.3 google-api-core==2.11.0 -google-cloud-storage==2.8.0 \ No newline at end of file +google-cloud-storage==2.9.0 \ No newline at end of file From b88278a3e43662b1829dac50b040152cf7845356 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Tue, 13 Jun 2023 16:48:00 +0200 Subject: [PATCH 28/31] chore(deps): update dependency pytest to v7.3.2 (#186) --- bigquery-migration/snippets/requirements-test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bigquery-migration/snippets/requirements-test.txt b/bigquery-migration/snippets/requirements-test.txt index 7fedba1b2528..01750b6a9c9e 100644 --- a/bigquery-migration/snippets/requirements-test.txt +++ b/bigquery-migration/snippets/requirements-test.txt @@ -1,4 +1,4 @@ -pytest==7.3.1 +pytest==7.3.2 google-cloud-testutils==1.3.3 google-api-core==2.11.0 google-cloud-storage==2.9.0 \ No newline at end of file From b7365836976b2395a7a3bc8bdb22547546f647a8 Mon Sep 17 00:00:00 2001 From: Yu-Han Liu Date: Fri, 16 Jun 2023 14:21:32 -0700 Subject: [PATCH 29/31] skip python-2.7 and python-3.6 in sample test --- bigquery-migration/snippets/noxfile_config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bigquery-migration/snippets/noxfile_config.py b/bigquery-migration/snippets/noxfile_config.py index 706b3f3a0be9..c8377ecb974b 100644 --- a/bigquery-migration/snippets/noxfile_config.py +++ b/bigquery-migration/snippets/noxfile_config.py @@ -22,7 +22,7 @@ TEST_CONFIG_OVERRIDE = { # You can opt out from the test for specific Python versions. - "ignored_versions": [], + "ignored_versions": ["2.7", "3.6"], # Old samples are opted out of enforcing Python type hints # All new samples should feature them "enforce_type_hints": True, From b8aa0d2a6b0912c0f8e84881f7b65f54c77bea11 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Tue, 20 Jun 2023 17:00:32 +0000 Subject: [PATCH 30/31] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20?= =?UTF-8?q?post-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- bigquery-migration/snippets/create_migration_workflow.py | 1 + 1 file changed, 1 insertion(+) diff --git a/bigquery-migration/snippets/create_migration_workflow.py b/bigquery-migration/snippets/create_migration_workflow.py index a0ee9cbbac6b..b5ce3eb51ee7 100644 --- a/bigquery-migration/snippets/create_migration_workflow.py +++ b/bigquery-migration/snippets/create_migration_workflow.py @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. + # [START bigquery_migration_create_workflow] def create_migration_workflow( gcs_input_path: str, gcs_output_path: str, project_id: str From 328f00df609fbdf52180de8e185e6262dfefb55a Mon Sep 17 00:00:00 2001 From: Yu-Han Liu Date: Tue, 11 Jul 2023 10:16:51 -0700 Subject: [PATCH 31/31] update CODEOWNERS for bigquery-migration --- .github/CODEOWNERS | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index d523c7d254a0..66f4effe0e9c 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -99,6 +99,7 @@ /cloud-media-livestream/**/* @GoogleCloudPlatform/cloud-media-team @GoogleCloudPlatform/python-samples-reviewers /bigquery-connection/**/* @GoogleCloudPlatform/api-bigquery @GoogleCloudPlatform/python-samples-reviewers /bigquery-datatransfer/**/* @GoogleCloudPlatform/api-bigquery @GoogleCloudPlatform/python-samples-reviewers +/bigquery-migration/**/* @GoogleCloudPlatform/api-bigquery @GoogleCloudPlatform/python-samples-reviewers /dlp/**/* @GoogleCloudPlatform/googleapis-dlp @GoogleCloudPlatform/python-samples-reviewers /functions/spanner/* @GoogleCloudPlatform/api-spanner-python @GoogleCloudPlatform/functions-framework-google @GoogleCloudPlatform/python-samples-reviewers /healthcare/**/* @GoogleCloudPlatform/healthcare-life-sciences @GoogleCloudPlatform/python-samples-reviewers