Skip to content

Commit

Permalink
Create output schema if not exists
Browse files Browse the repository at this point in the history
  • Loading branch information
balazsdukai committed Feb 4, 2019
1 parent 34ec63a commit bbbd6f4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bag3d/importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ def csv2db(conn, cfg, out_paths):

table_idx = sql.Identifier(cfg['output']['schema'] + "_id_idx")
a = create_heights_table(conn, cfg['output']['schema'], cfg['output']['table'])

conn.sendQuery(sql.SQL("CREATE SCHEMA IF NOT EXISTS {schema};").format(schema=schema_out_q))

if a:
tbl = ".".join([cfg['output']['schema'], cfg['output']['table']])
Expand Down

0 comments on commit bbbd6f4

Please sign in to comment.