pudo / dataset

Easy-to-use data handling for SQL data stores with support for implicit table creation, bulk loading, and transactions.
https://dataset.readthedocs.org/
MIT License
4.76k stars 297 forks source link

create_table error when source data has ID field #406

Open ianengelbrecht opened 1 year ago

ianengelbrecht commented 1 year ago

Importing data into sqlite, the data that I'm reading from source (a dbf file) already has a field called ID. I've tried:

table = db.create_table(table_name, primary_id = 'ID')

but that throws sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) duplicate column name: ID

I also tried lowercase 'id' in case case the field name is case sensitive but still getting the error.

Is this expected behaviour?