Batch CSV Exports

Batch CSV Exports

Introduction

In this case, the merged file is a CSV file with a row for each record and columns for each chosen metadata field. The CSV export has the following variables

  • Standard properties of Batches (user, filter, etc)

  • The separator between rows: fixed at \n

  • The separator between columns: fixed at ;

  • The separator inside columns: fixed at ,

Headers

The order of the columns in the CSV export is determined by the order in which the Field Definitions appear in the associated profile. As described in the next section, there are multiple corresponding columns for certain Metadata Field Types.

If a label is defined for a field on the profile, the label will be used as a header. The language is chosen based on the user who started the batch.

If no label is defined for the field on the profile, the header is chosen based on the option ‘HeaderType’. This is set when creating the batch.

  • DottedKey: the dotted key of the field is used as a header.

  • LongTranslation: The long translation of the field is used, based on the locale of the user.

Column formatting

The values are determined by the Metadata Field Types of the columns

Field

Columns

Example columns

Example value

Field

Columns

Example columns

Example value

Simple Fields

Single column

Descriptive.Title

Hello world

ListField

A single column whose value is the concatenation of the values using another delimiter

Descriptive.Keywords.Keyword

Alice, Bob, Cedric

MultiItemField

Multiple columns, one for each sub-field, whose value is the concatenation of its subvalues using another delimiter

  1. Descriptive.Authors.Author

  2. Descriptive.Authors.Photographer

  1. Alice

  2. Bob, Cedric

MapField

Multiple columns, one for each sub-field

  1. Structural.Versioning.Status

  2. Structural.Versioning.Id

  3. Structural.Versioning.Version

  1. Head

  2. xyz

  3. 32

Other Complex Fields

Single column with as value the JSON representation of the field

  • Descriptive.LimitedCategories

{
"Category": [
{
"En": "Amphibian",
"Nl": "Amfibie",
"Uri": "..."
},
{
"En": "Reptile",
"Nl": "Reptiel",
"Uri": "..."
}
]
}