Upload

List

{
"kind": "upload",
"uri": string,
"id": integer,
"name": string,
"status": string("queued","running","completed","failed"),
"hash": string,
"size": string(int64),
"numRows": string(int64),
"numBytes": string(int64),
}

Get

In addition to the base definition, any upload resource returned by a get request will contain the following properties:

{
"type": string("delimited", "avro", "ndjson", "parquet", "orc", "xls", "xlsx", "dta", "sas7bdat", "sav"),
"mergeStrategy": string("replace","append"),
"hasHeaderRow": bool,
"delimiter": string,
"quoteCharacter": string,
"skipBadRecords": bool,
"badRecordsCount": string(int64),
"allowQuotedNewLines": bool,
"errorMessage": string
}

Documentation

field

List

kind

string

The resource type. Will always be "variable".

uri

string

The fully qualified reference to this upload, for use in generating calls to this API.

For example, /tables/imathews.example:123.test:456/uploads/789

id

integer

The unique identifier for the upload

name

string

The name of the file. Defaults to untitled_upload.{type}

status

string

The current status of the upload. Will be null until upload.put is called, after which it will be one of "queued", "running", "completed", "failed"

hash

string

The md5 hash of the upload's content. Will be null before upload.put is called.

size

string(int64)

The size, in bytes, of the uploaded content. Will be null before upload.put is called.

numRows

string(int64)

The number of rows in the uploaded content

numBytes

string(int64)

A string representation of the number of bytes stored in Redivis's tabular representation of the upload. This will likely be different than size, which reflects the number of bytes in the data format that was uploaded.

Get

type

string

The type of file being uploaded. Must be on of: csv | avro | ndjson | parquet | orc | xls | xlsx, dta | sas7bdat | sav

mergeStrategy

string

Whether this version will replace or append to the previous version's content.

Must be one of "replace", "append" . Will always be "replace" if the table was previously empty.

All uploads on a given version must have the same merge strategy.

hasHeaderRow

boolean

Whether the first row contains a list of variable names. Defaults to true. Only relevant for types csv,xls,xlsx

delimiter

string

The delimiter used to separate cells in file. Only relevant for type csv. If null (the default), the delimiter will be auto-computed based on an analysis of a preview of the file.

quoteCharacter

string

The quote sequence used to escape cells in a csv , not relevant for other types. Defaults to ". In order to escape a quote character, it must be doubled — e.g.:

"She said, ""Hello"""

skipBadRecords

boolean

Defaults to false. If true, upload will succeed even if some records cannot be parsed.

allowQuotedNewLines

boolean

Whether to allow newline characters in cells. Only relevant for types csv,xls,xlsx. Defaults to false.

errorMessage

string

If status == "failed", will provide additional information about what cause the upload failure.