Skip to content
Snippets Groups Projects
Commit bdf8f585 authored by mjbonifa's avatar mjbonifa
Browse files

Merge branch '45-fix-sqlite_sequence-csv-in-export' into 'dev'

(fix) removed export of sqlite_sequence. Closes #45

Closes #45

See merge request meldb/concepts-processing!30
parents e683b6f1 6421a3f5
No related branches found
No related tags found
No related merge requests found
...@@ -315,7 +315,9 @@ def export(map_path, export_path, version, omop_metadata): ...@@ -315,7 +315,9 @@ def export(map_path, export_path, version, omop_metadata):
# Export each table to a separate CSV file # Export each table to a separate CSV file
for table in tables: for table in tables:
table_name = table[0] # Extract table name table_name = table[0]
# ignore SQLite's internal system table
if table_name != "sqlite_sequence":
df = pd.read_sql_query(f"SELECT * FROM {table_name}", conn) df = pd.read_sql_query(f"SELECT * FROM {table_name}", conn)
output_file = f"{table_name}.csv" output_file = f"{table_name}.csv"
output_path = export_path / output_file output_path = export_path / output_file
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment