Skip to content

Commit

Permalink
test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
IlyaFaer committed May 15, 2024
1 parent 6fc11f2 commit 0efdf42
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions tests/load/pipeline/test_pipelines.py
Original file line number Diff line number Diff line change
Expand Up @@ -1006,8 +1006,8 @@ def table_3(make_data=False):
job_client, _ = pipeline._get_destination_clients(schema)

if destination_config.staging and isinstance(job_client, WithStagingDataset):
with pipeline.sql_client() as client:
for i in range(1, 4):
for i in range(1, 4):
with pipeline.sql_client() as client:
table_name = f"table_{i}"

if job_client.should_load_data_to_staging_dataset(
Expand All @@ -1020,7 +1020,12 @@ def table_3(make_data=False):
else:
ind = tab_name.rfind(".") - 1

tab_name = tab_name[:ind] + "_staging" + tab_name[ind:]
if destination_config.destination == "snowflake":
suffix = "_STAGING"
else:
suffix = "_staging"

tab_name = tab_name[:ind] + suffix + tab_name[ind:]

with client.execute_query(f"SELECT * FROM {tab_name}") as cur:
assert len(cur.fetchall()) == 0
Expand Down

0 comments on commit 0efdf42

Please sign in to comment.