From 331a8e6e55789e6a6ee0c1a4a69d6e9b333599e4 Mon Sep 17 00:00:00 2001 From: Anders Date: Thu, 13 Jul 2023 11:40:58 -0400 Subject: [PATCH] Revert "Add `batch_id` param to profile to pass along with `dataproc_v1.CreateBatchRequest` (#727)" This reverts commit a42e13d8023123102c4d1aeefdfa6cd6246c4768. --- .changes/unreleased/Features-20230517-092205.yaml | 6 ------ dbt/adapters/bigquery/connections.py | 1 - dbt/adapters/bigquery/python_submissions.py | 1 - test.env.example | 1 - tests/conftest.py | 2 -- 5 files changed, 11 deletions(-) delete mode 100644 .changes/unreleased/Features-20230517-092205.yaml diff --git a/.changes/unreleased/Features-20230517-092205.yaml b/.changes/unreleased/Features-20230517-092205.yaml deleted file mode 100644 index 9afde587d..000000000 --- a/.changes/unreleased/Features-20230517-092205.yaml +++ /dev/null @@ -1,6 +0,0 @@ -kind: Features -body: Add batch_id param to profile -time: 2023-05-17T09:22:05.264368+01:00 -custom: - Author: nickozilla - Issue: "671" diff --git a/dbt/adapters/bigquery/connections.py b/dbt/adapters/bigquery/connections.py index 8662da1de..b466fee3b 100644 --- a/dbt/adapters/bigquery/connections.py +++ b/dbt/adapters/bigquery/connections.py @@ -133,7 +133,6 @@ class BigQueryCredentials(Credentials): dataproc_region: Optional[str] = None dataproc_cluster_name: Optional[str] = None gcs_bucket: Optional[str] = None - batch_id: Optional[str] = None dataproc_batch: Optional[DataprocBatchConfig] = field( metadata={ diff --git a/dbt/adapters/bigquery/python_submissions.py b/dbt/adapters/bigquery/python_submissions.py index 29e33032d..0c7ce1917 100644 --- a/dbt/adapters/bigquery/python_submissions.py +++ b/dbt/adapters/bigquery/python_submissions.py @@ -122,7 +122,6 @@ def _submit_dataproc_job(self) -> dataproc_v1.types.jobs.Job: request = dataproc_v1.CreateBatchRequest( parent=parent, batch=batch, - batch_id=self.credential.batch_id, ) # make the request operation = self.job_client.create_batch(request=request) # type: ignore diff --git a/test.env.example b/test.env.example index 70befbbbb..ffe9ee060 100644 --- a/test.env.example +++ b/test.env.example @@ -15,4 +15,3 @@ DBT_TEST_USER_3="serviceAccount:dbt-integration-test-user@dbt-test-env.iam.gserv DATAPROC_REGION=us- DATAPROC_CLUSTER_NAME= GCS_BUCKET= -BATCH_ID= diff --git a/tests/conftest.py b/tests/conftest.py index b5a967a09..0ba0091fb 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -33,7 +33,6 @@ def oauth_target(): "dataproc_region": os.getenv("DATAPROC_REGION"), "dataproc_cluster_name": os.getenv("DATAPROC_CLUSTER_NAME"), "gcs_bucket": os.getenv("GCS_BUCKET"), - "batch_id": os.getenv("BATCH_ID"), } @@ -54,5 +53,4 @@ def service_account_target(): "DATAPROC_CLUSTER_NAME" ), # only needed for cluster submission method "gcs_bucket": os.getenv("GCS_BUCKET"), - "batch_id": os.getenv("BATCH_ID"), }