Update push_data_postgres

parent b49b5903
...@@ -119,7 +119,7 @@ class PushDataToPostgres(): ...@@ -119,7 +119,7 @@ class PushDataToPostgres():
output = io.StringIO() output = io.StringIO()
df.to_csv(output, sep='\t', header=False, index=False) df.to_csv(output, sep='\t', header=False, index=False)
output.seek(0) output.seek(0)
cur.copy_from(output, filename, null="") cur.copy_from(output, table_name, null="")
conn.commit() conn.commit()
self.update_status(filename=each_file, status=success_status) self.update_status(filename=each_file, status=success_status)
except Exception as file_read_error: except Exception as file_read_error:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment