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.78k stars 298 forks source link

How to append into a table an extra column with timestamp? #247

Open manel00 opened 6 years ago

manel00 commented 6 years ago

Hi,

First of all, really interesting software. I'm trying to do with easy-etl + dataset, on the 2 db, i need to append timestamp (must be created the new column at the end on 2 db and every row must have timestamp value). Thank you very much

Regards

pudo commented 4 years ago

We usually do this on the application level, so I'm curious what you think the cleanest way of implementing this would be. Perhaps we should build in support for blinker that allows you to add a callback function into the insert code and set your column names there.

harmony5 commented 3 years ago

Maybe allow create_column() to accept a callback in default= returning the default value.