csv_file_load
This method is used to import a csv from the file system into HarperDB. The first row should contain column header names which will be used as attribute names. Each row will be considered a distinct entity in the database.
The file must reside on the host running HarperDB. We currently do not support direct file uploads.
- operation (required) - must always be csvfileload
- action (optional) - type of action you want to perform. Options are insert or update, default is insert
- schema (required) - name of the schema where you are loading your data
- table (required) - name of the table where you are loading your data
- file_path (required) - path to the csv file on the host running harperdb
Request Body
{"operation"=>"csv_file_load", "action"=>"insert", "schema"=>"dev", "table"=>"breed", "file_path"=>"/home/user/imports/breeds.csv"}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string | ||
Authorization | string |
RESPONSES
status: OK
{"message":"Starting job with id c7d3f896-8e17-4ac4-ae21-a84d8363fd2d"}