Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions airflow/providers/google/cloud/hooks/bigquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -2418,10 +2418,6 @@ def var_print(var_name):
f"{var_print(var_name)}Expect format of (<project.|<project:)<dataset>.<table>, "
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(
Expand Down
7 changes: 2 additions & 5 deletions tests/providers/google/cloud/hooks/test_bigquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
[
Expand All @@ -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
Expand Down