We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents da6e608 + 0f4b91a commit da31d2bCopy full SHA for da31d2b
clickhouse_mysql/tablemigrator.py
@@ -2,6 +2,7 @@
2
# -*- coding: utf-8 -*-
3
4
import logging
5
+import os.path
6
7
from MySQLdb.cursors import SSDictCursor,Cursor
8
from clickhouse_mysql.tableprocessor import TableProcessor
@@ -100,7 +101,11 @@ def __init__(
100
101
db, table = TableProcessor.parse_full_table_name(full_table_name)
102
if not db in self.where_clauses:
103
self.where_clauses[db] = {}
- self.where_clauses[db][table] = open(where_file_name, 'r').read().strip("\n")
104
+
105
+ if os.path.isfile(where_file_name):
106
+ self.wheres[db][table] = open(where_file_name,'r').read().strip("\n")
107
+ else:
108
+ self.wheres[db][table] = where_file_name
109
110
# debug info
111
logging.info("migration where clauses")
0 commit comments