Skip to content

Commit aa317d9

Browse files
authored
Fix select * query xcom push for BigQueryGetDataOperator (#22936)
Use in instead of get for conditinal check
1 parent a0f7e61 commit aa317d9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

airflow/providers/google/cloud/operators/bigquery.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -467,6 +467,14 @@ def execute(self, context: 'Context') -> list:
467467
impersonation_chain=self.impersonation_chain,
468468
)
469469

470+
if not self.selected_fields:
471+
schema: Dict[str, list] = hook.get_schema(
472+
dataset_id=self.dataset_id,
473+
table_id=self.table_id,
474+
)
475+
if "fields" in schema:
476+
self.selected_fields = ','.join([field["name"] for field in schema["fields"]])
477+
470478
rows = hook.list_rows(
471479
dataset_id=self.dataset_id,
472480
table_id=self.table_id,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy