What is a "Container Data Set"?

A Container Data Set is a container for other data sets but does not contain any data in the data store itself.

A container data set can have properties and can be linked with other data sets.

Each data set can be part of exactly one or none container data sets (1:N relationship). The contained data sets that have an order, i.e. there is a first, a second, and a last data set within a container.

It is decided on the level of the Data Set Type whether its data sets are container or not, i.e. either all data sets of a type are container or all are plain (non-container) data sets.

How does a Container Data Set show up in openBIS?

In the data set detail view, container data sets have one additional tab which reads "Contained Data Sets".

Additionally, the "Files" Data View for a container data set will show all the files in all contained data sets "overlayed" (per directory): If data set A has file original/a and data set B has file original/b, then the container data set C, wrapping A and B, will have both files in its file listing. If two contained data sets have the same file, the order of the data set in the container matters and the file of the last data set "wins". So if data set A and data set B both have a file x.tiff and C contains A and B (in this order), then C will have the x.tiff of data set B.

Creating Container Data Sets from a Jython Dropbox

Here is a short example of how you can create a container data set within a Jython dropbox

transaction = service.transaction(incoming)

dataSet = transaction.createNewDataSet()
...
dataSet1 = transaction.createNewDataSet()
...

container = transaction.createNewDataSet()
container.setDataSetType("CONTAINER_TYPE")
container.setContainedDataSetCodes([dataSet.dataSetCode, dataSet1.dataSetCode])

...

transaction.commit()