Skip to content

Item filtering

Description

This transformation is applicable to models that contain collection of "items" (e.g. variables). Dfs2, Dfs3, netcdf files typically contain one or more items (such as temperature, sea surface height and so on), but also datasets in the Multidimensional storage have items. The transformation allows to select only a subset of these items for further processing (e.g during export from Multidimensional storage to a file).

Example

This request to /api/conversion/upload-convert

{
  "readerName": "<reader name>",
  "writerName": "<writer name>",
    ...
  "transformations": [
    {
        type: "ItemFilterTransformation",
        itemFilter: {
            itemIndices: [0, 1, 2]
        }
    }
  ]
}
var transferResult = await transferClient
            .CreateFileImport(projectId, "<local file>")
            ...
            .WithItemFilteringTransformation(0, 1, 2)
            ...
            .ExecuteAsync();

will only select the first three items from the source file. Other forms of filtering (e.g. by name) will be implemented on request (or self-service).