This is an automated email from the ASF dual-hosted git repository. mobuchowski pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push: new 5079f7d8557 Fix failing OpenLineage emition for InsertBigQueryOperator (#44650) 5079f7d8557 is described below commit 5079f7d8557ac2334aadfdbb9ce209199116fb06 Author: Salome Papiashvili <salome.papiashvil...@gmail.com> AuthorDate: Tue Dec 10 15:42:55 2024 +0100 Fix failing OpenLineage emition for InsertBigQueryOperator (#44650) * specify location in BigQuery client * add location in test operator class --- providers/src/airflow/providers/google/cloud/openlineage/mixins.py | 2 +- providers/tests/google/cloud/openlineage/test_mixins.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/providers/src/airflow/providers/google/cloud/openlineage/mixins.py b/providers/src/airflow/providers/google/cloud/openlineage/mixins.py index 6ea744ad863..df8a0875f8c 100644 --- a/providers/src/airflow/providers/google/cloud/openlineage/mixins.py +++ b/providers/src/airflow/providers/google/cloud/openlineage/mixins.py @@ -88,7 +88,7 @@ class _BigQueryOpenLineageMixin: job_facets = {"sql": SQLJobFacet(query=SQLParser.normalize_sql(self.sql))} - self.client = self.hook.get_client(project_id=self.hook.project_id) + self.client = self.hook.get_client(project_id=self.hook.project_id, location=self.location) job_ids = self.job_id if isinstance(self.job_id, str): job_ids = [self.job_id] diff --git a/providers/tests/google/cloud/openlineage/test_mixins.py b/providers/tests/google/cloud/openlineage/test_mixins.py index 5229db3a607..41e4a22ee3f 100644 --- a/providers/tests/google/cloud/openlineage/test_mixins.py +++ b/providers/tests/google/cloud/openlineage/test_mixins.py @@ -64,6 +64,7 @@ class TestBigQueryOpenLineageMixin: class BQOperator(_BigQueryOpenLineageMixin): sql = "" job_id = "job_id" + location = None @property def hook(self):