Skip to main content
Version: Next

UploadPostSchema

already_existsstring

What to do if the table already exists accepts: fail, replace, append

Possible values: [fail, replace, append]

Default value: fail
column_data_typesstring

[CSV only] A dictionary with column names and their data types if you need to change the defaults. Example: {'user_id':'int'}. Check Python Pandas library for supported data types

column_datesstring[]

[CSV and Excel only] A list of column names that should be parsed as dates. Example: date,timestamp

columns_readstring[]

A List of the column names that should be read

dataframe_indexboolean

Write dataframe index as a column.

day_firstboolean

[CSV only] DD/MM format dates, international and European format

decimal_characterstring

[CSV and Excel only] Character to recognize as decimal point. Default is '.'

delimiterstring

[CSV only] The character used to separate values in the CSV file (e.g., a comma, semicolon, or tab).

filestring<text/csv>required

The file to upload

header_rowinteger

[CSV and Excel only] Row containing the headers to use as column names (0 is first line of data). Leave empty if there is no header row.

index_columnstring

[CSV and Excel only] Column to use as the row labels of the dataframe. Leave empty if no index column

index_labelstring

Index label for index column.

null_valuesstring[]

[CSV and Excel only] A list of strings that should be treated as null. Examples: '' for empty strings, 'None', 'N/A', Warning: Hive database supports only a single value

rows_to_readintegernullable

[CSV and Excel only] Number of rows to read from the file. If None, reads all rows.

Possible values: >= 1

schemastring

The schema to upload the data file to.

sheet_namestring

[Excel only]] Strings used for sheet names (default is the first sheet).

skip_blank_linesboolean

[CSV only] Skip blank lines in the CSV file.

skip_initial_spaceboolean

[CSV only] Skip spaces after delimiter.

skip_rowsinteger

[CSV and Excel only] Number of rows to skip at start of file.

table_namestringrequired

The name of the table to be created/appended

Possible values: non-empty and <= 10000 characters

typerequired

File type to upload

Possible values: [csv, excel, columnar]

UploadPostSchema
{
"already_exists": "fail",
"column_data_types": "string",
"column_dates": [
"string"
],
"columns_read": [
"string"
],
"dataframe_index": true,
"day_first": true,
"decimal_character": "string",
"delimiter": "string",
"file": "string",
"header_row": 0,
"index_column": "string",
"index_label": "string",
"null_values": [
"string"
],
"rows_to_read": 0,
"schema": "string",
"sheet_name": "string",
"skip_blank_lines": true,
"skip_initial_space": true,
"skip_rows": 0,
"table_name": "string"
}