Skip to content

CSV

headers

Determines if a CSV output (or input) should contain column names as headers.

Usage:

?headers=[True_or_false]

Value type: boolean (True or False)

Default: True

Applicable to:

  • PUT of csv document on list of resources, list of arrays, vectors
  • POST of csv document on resource table endpoints

Examples:
/Chinook/Customer.csv - default (with headers)
/Chinook/Customer.csv?headers=True - with headers
/Chinook/Customer.csv?headers=False - without headers


csvNullStr

Allows to set NULL value in database when uploading CSV document (only POST or PUT).

The csv documents do not have specific character that would explicitly mean "no value". SlashDB provides a csvNullStr query parameter which defines the representation for a NULL value in parsed csv document.

This flag is useful only for nullable columns and does not affect the way the database driver handles NULL values.

Value type: string

Default: (empty string)

Applicable to:

  • PUT of csv document on list of resources, list of arrays, vectors
  • POST of csv document on resource table endpoints

Usage:

?csvNullStr=[string_representing_null_in_csv]

Examples:

Making a POST request to https://demo.slashdb.com/db/Chinook/Invoice.csv?csvNullStr=myNull with data:

InvoiceId,CustomerId,InvoiceDate,BillingAddress,BillingCity,BillingState,BillingCountry,BillingPostalCode,Total
1000,2,2666-01-01 00:00:00,myNull,Test City,Test State,Test Country,00 000,6.66

will result in passing to database NULL for BillingAddress.