Add Dataset Files
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
Imported from: from indico.queries.datasets import AddDatasetFiles
-
dataset_id: intID of the dataset (required) -
files: list[str]List of pathnames to the dataset files you want to upload. (required) -
autoprocess: bool = FalseAutomatically process new dataset files (optional) -
wait: bool = TrueBlock while polling for status of files (optional) -
batch_size: int = 20Batch size when uploading files (optional)
Outputs
The updated Dataset 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])
)
