I am trying to import CSV data into a table.
First problem is usability.
My CSV has only three columns I care about: ItemName, ItemCode, Quantity. The Table has Id, CreatedOnDate, IsPurchase, etc, many more columns.
Id is an auto increment column, so I can't put a value in my CSV for it. What do I do here?
CreatedOnDate should simply be UtcNow(), IsPurchase defaults to false. How can I specify default values for these?
Even when I tell it that the first row is a header, it doesn't seem to be able to match columns. The columns have to be in exact order as they appear in DB.
So the work around is to manipulate the spreadsheet to look exactly like the table does. Though at this point it would have been quicker to simply write a script to parse the csv, and create insert statements.
The Second Problem is a Bug.
If any errors occur in the import, nothing happens. no error message, nothing written to the specified error log. Nothing. In fact I thought the feature was just flat out broken, until I realized, I had the order of a couple column incorrect.