You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@peterdesmet: I've done some research about this and it appears that reordering field is not really possible on an existing table. Changing data types/constraints can also be cumbersome. I'm therefore thinking a better way to implement this could be:
rename the existing table to table_name__old
create a fresh table table_name based on the schema file (with the right field order, extra constraints, ...)
copy data from table_name__old to table_name (that might explode in flight if the existing data doesn't fit the field types and constraint defined in the schema). Also warn of data loss if some columns in the original data don't exist in the schema.
If all if successful, drop table_name__old
Any opinion about this before I jump to implementation? thanks!
Following discussion with @peterdesmet, it's been decided to create a new command:
It takes a sqlite database, a table name and a schema file (example: https://github.com/timrobertson100/frictionless-transforms/blob/master/datasets/periodic_table/transforms/table_schema.json) and:
The text was updated successfully, but these errors were encountered: