This is my fork on dinedal/textql. The major enhancements include the following features:
- Add two new options on command line:
- pk - Enable end user can provide primary key information during table creation;
- ori_op - How to deal with the duplicated records. This option will work only with valid pk . Must be one of (replace/rollback/abord/fail/ignore/)
- ori_op - Show variable summary after imported the data
- Add more information output in verbose mode, to enable user understand the full process result more clearly;
- There is a bug in current SQLite driver that the result of
pragma table_info('table_name')
can not fetch the pk information correctly;
under my windows, I use the following command to import all 600000 records into table AirlineDemoSmall2
textql.exe -dlm "," -header -save-to test002.db -source C:\SampleData\AirlineDemoSmall.csv -table-name AirlineDemoSmall2 -verbose
Meanwhile, I use the following command to import 7 records into table AirlineDemoSmall( replaced duplicate records by DayOfWeek)
textql.exe -dlm "," -pk "DayOfWeek" -header -dup "replace" -save-to test002.db -source C:\SampleData\AirlineDemoSmall.csv -table-name AirlineDemoSmall -verbose