From 560b338aef202eb7cdf06c82be38d9774eb845f5 Mon Sep 17 00:00:00 2001 From: ADBond <48208438+ADBond@users.noreply.github.com> Date: Thu, 2 Jan 2025 14:43:28 +0000 Subject: [PATCH] don't need to register tables that already exist in the backend! --- splinkclickhouse/clickhouse_server/database_api.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/splinkclickhouse/clickhouse_server/database_api.py b/splinkclickhouse/clickhouse_server/database_api.py index 75a0c22..c7006f2 100644 --- a/splinkclickhouse/clickhouse_server/database_api.py +++ b/splinkclickhouse/clickhouse_server/database_api.py @@ -26,13 +26,6 @@ def _table_registration(self, input, table_name) -> None: sql = self._create_table_sql_from_pd_frame(input, table_name) self._execute_sql_against_backend(sql) self.client.insert_df(table_name, input) - elif isinstance(input, str): - sql = ( - f"CREATE OR REPLACE TABLE {table_name} " - "ORDER BY tuple() " - f"AS SELECT * FROM {input}" - ) - self._execute_sql_against_backend(sql) else: raise TypeError( "ClickhouseServerAPI currently only accepts table names (str) "