Skip to main content
DMS can convert metadata between CSV (spreadsheet) format and DMS JSON records in both directions. This makes it easy to bulk-import records prepared in a spreadsheet application, or to export your archive for use in Excel, Google Sheets, or data analysis tools.

CSV column format

The DMS CSV format uses a flat set of columns that map to the nested JSON structure. Multi-value fields use | (pipe) as a separator within a single cell.

Multi-value fields

Three columns accept multiple values separated by |: The creator_name and creator_role columns are positional: the first name is paired with the first role, the second name with the second role, and so on.

Example rows from batch.csv

batch.csv

Importing CSV to JSON

This reads every row in batch.csv and writes a JSON array of DMS records.
By default the output file is named <stem>_converted.json. For a file named batch.csv the output will be batch_converted.json. Use --output to choose a different path:
If you pass a directory path as --output, each row is written as an individual file named <type>_<id[:8]>.json:
Rows without an id value are assigned a new UUID automatically.

Exporting JSON to CSV

Both a single JSON object and a JSON array of records are accepted. By default the output path is the same as the input with the extension changed to .csv:
json2csv defaults to <input-stem>.csv. For story_b3e7c8a1.json the output will be story_b3e7c8a1.csv. Override with --output:

Round-trip workflow

You can convert records back and forth between formats without data loss:
The CSV format flattens nested JSON fields. The coverage object (start_date, end_date, period) and the relation array have no corresponding CSV columns and will not survive a round-trip through CSV. If your records use these fields, work directly in JSON.