Skip to content

Commit

Permalink
don't need to register tables that already exist in the backend!
Browse files Browse the repository at this point in the history
  • Loading branch information
ADBond committed Jan 2, 2025
1 parent fdfc7a2 commit 560b338
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions splinkclickhouse/clickhouse_server/database_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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) "
Expand Down

0 comments on commit 560b338

Please sign in to comment.