You can upload files to Anaplan, split large upload files into chunks, download export files in chunks, and delete private file content that you uploaded through the API.

Chunking is useful for large files because it helps make uploads and downloads more resilient.

Use chunking when:

  • You want to resume a transfer if the connection is lost during an upload.
  • You are extracting data from a database and want to push it to the server without holding all the results in memory.
  • You need to upload a file larger than 1 MB.
  • You need to download an exported file in multiple parts.

The file list endpoint returns import and export files for a model. You can identify files by their metadata and id.

File metadata can include:

PropertyDescription
idThe file ID.
nameThe file name.
chunkCountThe number of chunks in the file.
delimiterThe delimiter character used in the file.
encodingThe file encoding.
firstDataRowThe first row after the row that contains column names.
formatThe file format.
headerRowThe row that contains column names.
separatorThe file separator.

Export files have fewer metadata properties than import files.

Chunked file transfer is often part of a larger integration workflow.

For imports:

  1. Upload the file or file chunks.
  2. Mark the upload complete.
  3. Start the import task.
  4. Poll the import task until it completes.
  5. Check or download dump files if the import has failures.

For exports:

  1. Start the export task.
  2. Poll the export task until it completes.
  3. Get the export file.
  4. Get the chunks in the file.
  5. Download each chunk.

You can see an example of a chunked file upload process, here.