Skip to main content
Uploading has three steps: create the dataset, describe its columns, and upload. For the rules, see Uploading data.

1. Create the dataset

If a dataset with that name exists in the repository, returnIdIfExists=True returns its record. Otherwise the method raises ValueError. It raises Exception if the request fails, for example when your plan does not let you create datasets.

2. Describe the columns

Before the first upload, use initialize_columns or declare the columns in the upload.
All three arguments are required. The method does not raise for every HTTP error, so check the result. It works only before the dataset has data.

3. Upload

Or upload a CSV string:
The SDK compresses the CSV with gzip. upload_data_from_df raises an error for an empty DataFrame.
bool
default:"True"
Only for DataFrames. Set False unless the index holds data, such as dates.

Check the response

The upload methods do not raise on HTTP errors. Check every response.
If the error body has a processId, processing may have started. Check that process before you upload again. A valid response only means that the upload was accepted. Wait for the process to finish.

Merge flags

bool
default:"False"
Delete existing data that is not in the upload.
bool
default:"False"
Overwrite existing values with uploaded values.
bool
default:"None"
Set True to allow new columns.
See Upload modes.

Declare columns in the upload

You can send a manifest with the upload:
  • dateColumnName and dateFormat go together. If you omit one, the date column is left out of the manifest.
  • entitiesColumnNames are text columns that identify each row.
  • stringColumnNames are value columns with text.
  • The SDK does not add numeric value columns to the manifest.

Next steps

Process status

Confirm that the upload finished.

Downloading data

Read the data back.