diff --git a/write_to_db.py b/write_to_db.py index 9c84bb4..b410bf9 100644 --- a/write_to_db.py +++ b/write_to_db.py @@ -33,9 +33,9 @@ def insert_fact(cursor, taxonomy, fact_id, label, description, unit): def insert_data(cursor, cik, fact_id, start, end, val, accn, fy, fp, form, filed, frame): cursor.execute( - """INSERT IGNORE INTO data (cik, fact_id, start, end, val, accn, fy, fp, form, filed, frame) + """INSERT IGNORE INTO data (cik, fact_id, end, start, val, accn, fy, fp, form, filed, frame) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)""", - (cik, fact_id, start, end, val, accn, fy, fp, form, filed, frame) + (cik, fact_id, end, start, val, accn, fy, fp, form, filed, frame) ) def cik_exists(cursor, cik): @@ -51,7 +51,7 @@ def parse_json_and_insert_data(file_path): # Start a new connection for each file conn = connect_to_db() if conn is None: - return False + return False try: cursor = conn.cursor()