File tree Expand file tree Collapse file tree 1 file changed +0
-20
lines changed Expand file tree Collapse file tree 1 file changed +0
-20
lines changed Original file line number Diff line number Diff line change @@ -117,26 +117,6 @@ def get_databases(self):
117117 database_list = [row [0 ] for row in databases ]
118118 return database_list
119119
120- def validate_database_schema (self , expected_tables ):
121- """Validates that all expected tables exist in the database and returns missing tables"""
122- if self .database not in self .get_databases ():
123- logger .warning (f"Database { self .database } does not exist" )
124- return False , expected_tables
125-
126- existing_tables = self .get_tables ()
127- missing_tables = [table for table in expected_tables if table not in existing_tables ]
128-
129- if missing_tables :
130- # Log with a count for large numbers of missing tables
131- if len (missing_tables ) > 10 :
132- sample_tables = ", " .join (missing_tables [:10 ])
133- logger .warning (f"Missing { len (missing_tables )} tables in { self .database } . First 10: { sample_tables } ..." )
134- else :
135- logger .warning (f"Missing tables in { self .database } : { ', ' .join (missing_tables )} " )
136- return False , missing_tables
137-
138- return True , []
139-
140120 def execute_command (self , query ):
141121 for attempt in range (ClickhouseApi .MAX_RETRIES ):
142122 try :
You can’t perform that action at this time.
0 commit comments