From 05d990d7138f27c5b416c5776a4c653ce6544188 Mon Sep 17 00:00:00 2001 From: Steve Nyemba Date: Sun, 9 Jul 2023 21:22:31 -0500 Subject: [PATCH] bug fix: table creation with schema (if any is provided) --- transport/sql.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/transport/sql.py b/transport/sql.py index 5357852..0d74fdc 100644 --- a/transport/sql.py +++ b/transport/sql.py @@ -307,7 +307,10 @@ class SQLWriter(SQLRW,Writer): if 'schema' in _args : if type(_args['schema']) == str : self.schema = _args['schema'] if 'schema' in _args else self.schema - elif type(_args['schema']) == list and not self.has(table=table): + elif type(_args['schema']) == list and len(_args['schema']) > 0 and not self.has(table=table): + # + # There is a messed up case when an empty array is passed (no table should be created) + # self.make(table=table,schema=_args['schema']) pass # self.schema = _args['schema'] if 'schema' in _args else self.schema