File tree Expand file tree Collapse file tree
splitgraph/ingestion/sqlite Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import contextlib
22import itertools
3+ import logging
34import os
45import re
56import sqlite3
@@ -153,6 +154,9 @@ def sqlite_connection_to_introspection_result(con: sqlite3.Connection) -> Intros
153154 # remove tables with invalid untyped columns
154155 for t in tables_with_untyped_columns :
155156 if t in schema :
157+ logging .warning (
158+ "Ignoring table '%s' as it includes columns without a declared type." % t
159+ )
156160 del schema [t ]
157161 return schema
158162
@@ -273,9 +277,11 @@ def _batched_copy(
273277 insert_table_contents ,
274278 ) # nosec
275279 except Exception as e :
276- print (
277- "Received exception %s running query '%s' with parameters %s"
278- % (str (e ), query , str (parameters ))
280+ logging .error (
281+ "Error running query '%s' with parameters %s" ,
282+ query ,
283+ str (parameters ),
284+ exc_info = e ,
279285 )
280286 raise e
281287 return total_row_count
You can’t perform that action at this time.
0 commit comments