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

Issue when creating id field #395

Open ahvahsky2008 opened 2 years ago

ahvahsky2008 commented 2 years ago

Try to upload mssql table to postgres table. When i try insert data - its raise error. datasets convert uniqueidentifier field to serial4

How manually setup column type?

image image

table.upsert_many(rows = list(data), keys = data.keys, chunk_size=1000)

(psycopg2.errors.InvalidTextRepresentation) invalid input syntax for type integer: "CDEA5888-293A-4D0B-B2DE-0001C633F4FE"

matecsaj commented 1 year ago

Note the create_table command documented here https://dataset.readthedocs.io/en/latest/api.html#database.