diff --git a/ClickHouse/C1_GetStructure.py b/ClickHouse/C1_GetStructure.py index 2ab24475..39cadee4 100644 --- a/ClickHouse/C1_GetStructure.py +++ b/ClickHouse/C1_GetStructure.py @@ -1,6 +1,5 @@ import pymysql import re -from config.db_config import * from config.db_config import MYSQL_CONFIG def get_mysql_table_structure(config, table): @@ -135,8 +134,8 @@ def generate_clickhouse_ddl(table_name, columns, indexes, primary_keys): # 使用示例 if __name__ == '__main__': + # 生成 t_station表的DDL table = 't_station' - # 获取表结构 columns, indexes, primary_keys = get_mysql_table_structure(MYSQL_CONFIG, table)