Details
-
Task
-
Resolution: Unresolved
-
Major
-
None
-
5.0.1
-
None
-
None
-
Windows 10
Description
Summary: The CSV files I'm trying are not handled by cbtransfer. I used a CSV file created by Powershell from a SQL Server export.
- Export data from SQL Server to CSV with a command like: "Invoke-Sqlcmd -query "SELECT * FROM table;" -Database mydatabasename -Server localhost | Export-Csv -NoTypeInformation -Path "mydata.csv" -Encoding UTF8
- This creates a CSV file. (Everything is in quotes, including the header)
- Use cbtransfer to import, for instance "cbtransfer.exe mydata.csv http://localhost:8091 -B MyBucket -u Adminitrator -p password"
Actual:
Error message "no 'id' field in 1st line of csv". If I add an id column to the query, it will still complain. I tried removing the quotes from the CSV header line and same error.
Expected:
It can find the id column. I may be doing something wrong, but it's not clear from the error message what is it.
An enhancement I'd like to see would be a way to specify a column and/or a lightweight template to create the id.
Notes:
I attached sample output CSV from step 1.
Also might be interesting in terms of prioritization: cbtransfer is used as an example in the whitepaper currently being pushed by marketing - https://resources.couchbase.com/c/relational-no-sql-wp?x=Y7B0ca
Attachments
Issue Links
- relates to
-
MB-27597 cbimport csv should handle fields in quotes
- Closed