Setting chunkcount for export actions

New Contributor

Setting chunkcount for export actions

 I noticed that every time I save an export definition, the chunk-count definition is set to 1. However other files created earlier have their chunk-count set to 0. 

Is there a way to select the chunk-count definition when creating an export action? (small file, no need to chunk. And only files with chunkCount 0 or large files with actual chunks can be download with an API)


export-info :
{'id': '116000000010', 'name': '116000000010', 'chunkCount': 1, 'firstDataRow': 0, 'headerRow': 0}

Thank you in advance for your help.


Re: Setting chunkcount for export actions

HI @cbak ,


I don't think that you can change the chunk count because its auto created when an export is defined. You can refer to the below questions that has been discussed.


Exporting the Files by API using Python 

Also my understanding is when Chunk Count 0 - signifies that you are downloading the file before you trigger the export action.


Re: Setting chunkcount for export actions


If you're using python you can use this script here. It's best to obtain the chunk count and then iterate on it. That makes it dynamic rather than hardcoding it.

# This script downloads a file in chunks. It will write all chunks to a newly
# created local file with the same name as the file. 
import requests
import base64
import sys
import json
from getAuthentication import userBA
from getGUIDs import wGuid, mGuid, fileID, fileName

url = (f'{wGuid}/models/{mGuid}/' +

getHeaders = {
    'Authorization': userBA

downloadHeaders = {
    'Authorization': userBA,

getChunkData = requests.get(url,
with open('downloadChunkData.json''wb'as f:

with open('downloadChunkData.json''r'as f:
    f2 = json.load(f)

with open(f'{fileName}''wb'as f:
    for i in f2:
        chunkData = i
        chunkID = i['id']
        print(f'Getting chunk {chunkID}')
        getChunk = requests.get(url + f'/{chunkID}',
        print('Status code: ' + str(getChunk.status_code))

Jared Dolich