You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
query='CREATE TABLE %s AS SELECT * FROM %s WHERE (%s) AND (%s)'%(p.object_table, object_table, " IS NOT NULL AND ".join(all_cols), " != '' AND ".join(all_cols))
1638
1662
self.execute(query)
1639
1663
1640
-
# Check whether we nuked the table.
1664
+
# Inform user of what we did. Also check whether we nuked the table.
1641
1665
try:
1642
-
query=f"SELECT COUNT(*) FROM {p.object_table}"
1643
-
res=self.execute(query)
1644
-
ifres[0][0]==0:
1666
+
query=f"SELECT COUNT() FROM {p.object_table}"
1667
+
res=self.execute(query)[0][0]
1668
+
ifres==0:
1645
1669
logging.error("Table checking removed all rows, you may have an empty column in your database. "
1646
1670
"Disable check_tables in your properties file if this is expected.")
1671
+
else:
1672
+
logging.info(f"Table checking removed {initial_count-res} rows with missing values")
1647
1673
except:
1648
1674
logging.error("Unable to validate checked object table")
0 commit comments