Skip to content

sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) database is locked #493

Open

Description

@EmmaGuo910

I found create_table_from_csv is too slow. I tried to use multiprocessing, but there is a lock of database, how should I do

thanks

Activity

  1. pdsparks commented on Apr 12, 2021

    @pdsparks

    Hi - I believe that sqlite write-locking will prevent multi process inserts.

    If you are trying to generate a table for one-off data exploration I would use a free program like HeidiSQL (Tools - Import CSV)

    If you are looking to automate an import process then maybe try checking this Stack response [here] (https://stackoverflow.com/questions/6977497/import-csv-file-into-sqlite3-database-in-command-line-or-via-batch-file)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions