You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by mo...@apache.org on 2023/08/08 16:26:34 UTC

[airflow] branch fix-sql-bq-property created (now e983f2999e)

This is an automated email from the ASF dual-hosted git repository.

mobuchowski pushed a change to branch fix-sql-bq-property
in repository https://gitbox.apache.org/repos/asf/airflow.git


      at e983f2999e bigquery: rename `sql` property in BigQueryInsertJobOperator

This branch includes the following new commits:

     new e983f2999e bigquery: rename `sql` property in BigQueryInsertJobOperator

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[airflow] 01/01: bigquery: rename `sql` property in BigQueryInsertJobOperator

Posted by mo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

mobuchowski pushed a commit to branch fix-sql-bq-property
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit e983f2999ebb73a3d70d19745caf862ffe7a0033
Author: Maciej Obuchowski <ob...@gmail.com>
AuthorDate: Tue Aug 8 18:25:24 2023 +0200

    bigquery: rename `sql` property in BigQueryInsertJobOperator
    
    Signed-off-by: Maciej Obuchowski <ob...@gmail.com>
---
 airflow/providers/google/cloud/operators/bigquery.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/airflow/providers/google/cloud/operators/bigquery.py b/airflow/providers/google/cloud/operators/bigquery.py
index d665414153..e8ba86d717 100644
--- a/airflow/providers/google/cloud/operators/bigquery.py
+++ b/airflow/providers/google/cloud/operators/bigquery.py
@@ -186,6 +186,8 @@ class _BigQueryOpenLineageMixin:
         job_facets = {}
         if hasattr(self, "sql"):
             job_facets["sql"] = SqlJobFacet(query=normalize_sql(self.sql))
+        if hasattr(self, "_executed_sql"):
+            job_facets["sql"] = SqlJobFacet(query=normalize_sql(self._executed_sql))
 
         return OperatorLineage(
             inputs=list(inputs.values()),
@@ -2738,7 +2740,7 @@ class BigQueryInsertJobOperator(GoogleCloudBaseOperator, _BigQueryOpenLineageMix
         self.poll_interval = poll_interval
 
     @property
-    def sql(self) -> str | None:
+    def _executed_sql(self) -> str | None:
         try:
             return self.configuration["query"]["query"]
         except KeyError: