Skip to content

Commit

Permalink
BigQueryTableExistenceSensor needs to specify keyword arguments (#9832)
Browse files Browse the repository at this point in the history
GitOrigin-RevId: 770de53eb57bd57ffc555ad15b18f0c058dbebe7
  • Loading branch information
nathadfield authored and Cloud Composer Team committed Sep 12, 2024
1 parent a558603 commit fcf72b9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 4 additions & 1 deletion airflow/providers/google/cloud/sensors/bigquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,7 @@ def poke(self, context):
hook = BigQueryHook(
bigquery_conn_id=self.bigquery_conn_id,
delegate_to=self.delegate_to)
return hook.table_exists(self.project_id, self.dataset_id, self.table_id)
return hook.table_exists(
project_id=self.project_id,
dataset_id=self.dataset_id,
table_id=self.table_id)
6 changes: 3 additions & 3 deletions tests/providers/google/cloud/sensors/test_bigquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def test_passing_arguments_to_hook(self, mock_hook):
delegate_to=TEST_DELEGATE_TO
)
mock_hook.return_value.table_exists.assert_called_once_with(
TEST_PROJECT_ID,
TEST_DATASET_ID,
TEST_TABLE_ID
project_id=TEST_PROJECT_ID,
dataset_id=TEST_DATASET_ID,
table_id=TEST_TABLE_ID
)

0 comments on commit fcf72b9

Please sign in to comment.