Skip to content

Commit a0a23e4

Browse files
nicer display of table ACL import errors
1 parent 33a80e4 commit a0a23e4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

data/notebooks/Import_Table_ACLs.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,12 @@ def execute_sql_statements(sqls):
190190
l = [ str(o) for o in error_causing_sqls ]
191191
print("\n".join(l))
192192

193+
# COMMAND ----------
194+
195+
# DBTITLE 1,Nicer error output
196+
if len(error_causing_sqls) != 0:
197+
l = [ {'sql': str(o.get('sql')), 'error': str(o.get('error'))} for o in error_causing_sqls ]
198+
display(spark.createDataFrame(l))
193199

194200
# COMMAND ----------
195201

0 commit comments

Comments
 (0)