Take care of fields with AUTOINCREMENT
- Dominant language
- Python
- Stars
- 1k
- Forks
- 131
- PR merge metrics
- No merged PRs in 30d
Description
Sometimes fields in tables were created with the AUTOINCREMENT command.
`into` should ignore this column and (let sqlalchemy) take care of this field when a user inserts data that does not have this field defined.
``` py
import os
import sqlite3
import pandas as pd
import numpy as np
from blaze import *
DB = 'test.db'
TABLE = 'position'
try:
os.remove(DB)
except OSError:
pass
conn = sqlite3.connect(DB)
conn.execute(
'''CREATE TABLE {} (
id integer NOT NULL PRIMARY KEY AUTOINCREMENT,
x real NOT NULL,
y real NOT NULL,
z real NOT NULL
)'''.format(TABLE)
)
conn.close()
positions = pd.DataFrame(np.random.randn(10, 3), columns=['x', 'y', 'z'])
table_url = 'sqlite:///' + DB + '::' + TABLE
into(table_url, positions)
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.