Add Dataset Files

Add files to a dataset.

Introduction

Let's say there are additional files you want to add to an existing dataset. To accomplish this, you can use the query: AddDatasetFiles.

AddDatasetFiles

Inputs

📥

AddDatasetFiles Inputs

Imported from: from indico.queries.datasets import AddDatasetFiles


dataset_id: int ID of the dataset (required)

files: list[str] List of pathnames to the dataset files you want to upload. (required)

autoprocess: bool = False Automatically process new dataset files (optional)

wait: bool = True Block while polling for status of files (optional)

batch_size: int = 20 Batch size when uploading files (optional)

Outputs

📤

AddDatasetFiles Outputs

UpdatedDataset Object with the added files - Check out Creating a Dataset for more information

Try It Out

Try out the AddDatasetFiles call:

from indico.queries.datasets import AddDatasetFiles
from indico.types.dataset import Dataset

dataset_file = "/path/to/file"
dataset_id = 123

dataset: Dataset = client.call(
  AddDatasetFiles(dataset_id=dataset_id, files=[dataset_file]) 
)