diff --git a/airflow/providers/google/cloud/hooks/bigquery.py b/airflow/providers/google/cloud/hooks/bigquery.py index b1aed15c458c..5f8881f45854 100644 --- a/airflow/providers/google/cloud/hooks/bigquery.py +++ b/airflow/providers/google/cloud/hooks/bigquery.py @@ -2418,10 +2418,6 @@ def var_print(var_name): f"{var_print(var_name)}Expect format of (., " f"got {table_input}" ) - - # Exclude partition from the table name - table_id = table_id.split("$")[0] - if project_id is None: if var_name is not None: self.log.info( diff --git a/tests/providers/google/cloud/hooks/test_bigquery.py b/tests/providers/google/cloud/hooks/test_bigquery.py index 81db43c0f531..02f442cfc7ca 100644 --- a/tests/providers/google/cloud/hooks/test_bigquery.py +++ b/tests/providers/google/cloud/hooks/test_bigquery.py @@ -1034,7 +1034,6 @@ def test_split_tablename_internal_need_default_project(self): with pytest.raises(ValueError, match="INTERNAL: No default project is specified"): self.hook.split_tablename("dataset.table", None) - @pytest.mark.parametrize("partition", ["$partition", ""]) @pytest.mark.parametrize( "project_expected, dataset_expected, table_expected, table_input", [ @@ -1045,11 +1044,9 @@ def test_split_tablename_internal_need_default_project(self): ("alt1:alt", "dataset", "table", "alt1:alt:dataset.table"), ], ) - def test_split_tablename( - self, project_expected, dataset_expected, table_expected, table_input, partition - ): + def test_split_tablename(self, project_expected, dataset_expected, table_expected, table_input): default_project_id = "project" - project, dataset, table = self.hook.split_tablename(table_input + partition, default_project_id) + project, dataset, table = self.hook.split_tablename(table_input, default_project_id) assert project_expected == project assert dataset_expected == dataset assert table_expected == table