From 6fc11f297132020f8055ee2e489aa83fd7fc22b1 Mon Sep 17 00:00:00 2001 From: IlyaFaer Date: Mon, 13 May 2024 19:15:26 +0400 Subject: [PATCH] test fix for clickhouse --- tests/load/pipeline/test_pipelines.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/load/pipeline/test_pipelines.py b/tests/load/pipeline/test_pipelines.py index 872ad71d16..72eb18cb79 100644 --- a/tests/load/pipeline/test_pipelines.py +++ b/tests/load/pipeline/test_pipelines.py @@ -1015,7 +1015,11 @@ def table_3(make_data=False): ): with client.with_staging_dataset(): tab_name = client.make_qualified_table_name(table_name) - ind = tab_name.rfind(".") - 1 + if destination_config.destination == "clickhouse": + ind = tab_name.rfind("___") + else: + ind = tab_name.rfind(".") - 1 + tab_name = tab_name[:ind] + "_staging" + tab_name[ind:] with client.execute_query(f"SELECT * FROM {tab_name}") as cur: