Once your List is created and configured, you can populate the list with a csv file. Let's see how you can do this on an Employee Dimension List.
First click on the Top right icon > "Import Data From CSV..."
Upload your csv file
Once your csv file is uploaded click on "Set up import".
Step 1: Describe CSV file format
This step will allow you to configure how Pigment should read the uploaded csv file.
Encoding: if some special character are not interpreted correctly in the preview, it likely to come from the encoding setting. Check which encoding is used by your csv file.
Column separator: Select the separator between each column (
Text delimiter: Select the Text delimiter
Date & number format: if you import number or date, check how they are formatted in the csv.
en-US: date are formatted in MM/DD/YYYY and number decimal separator is
fr-FR: date are formatted in DD/MM/YYYY and number decimal separator is
en-GB: date are formatted in DD/MM/YYYY and number decimal separator is
Pigment support 2 different types of Data layout:
- Flat: This mode is designed to support import of CSV file which have only column headers. Each line represent a different List item. The "Flat" mode is more adapted for import on List.
example of "Flat" CSV file :
- Pivoted: This mode is designed to support import of CSV file have only both header in row and columns. The "Pivoted" mode is more adapted for import on metric.
example of "Pivoted" CSV file :
|Jan 21||Feb 21||Mar 21||Apr 21||Jun 21||Jul 21||Aug 21|
When the "Flat" Data layout is used:
Header : Toggle "Include a header" if the csv file has column headers and specify in "Row number" which row contain those headers.
First row of data: specify which is the first line of your csv file containing data that you want to import into your list items. Can be useful if you want to ignore the first lines of your csv file.
Step 2: Map headers with properties
For each property of your List, select the right column of the csv file.
Each mapped csv column will be colored in blue.
In such case, you won't be allowed to trigger the import.
Mapping Dimension Properties
When you map one of the CSV column to a Property of type dimension, you can configure how pigment should identify the Dimension item.
By default, the "Default Property" of the Dimension will be selected but you can select any other unique property of the dimension by clicking on the cogs near the property.
Also once one property of type dimension is mapped a new option will appear:
By enabling this option, new item will be created in the dependent dimension if needed.
In the example above, the Gender dimensions will be populated during the import. If the Gender dimension contains no item with the Name property set to
M then two new item will be created.
You are done with the configuration, click on the "Import" to launch it!
Once the import is finished, a report will show how many items have been created and updated in the list.
If the "Automatically add new Items to dependent Dimensions" option has been enabled, you might see the list of Dependent dimensions where the import created new items. By hovering the (i) you will have a sample (up to 10 values) of created items.
Note: once the import has completed, you can find this Summary in the "Update History" of the block.
Save your import configuration
If you plan to run this import multiple times, you can save the import configuration (Step 1 and Step 2) by using the "Save Configuration" action. It can be triggered either before launching your import (step 2) or after the import (in the import summary).
To reload this configuration, use the "Load existing configuration" button (Step 1).
This will load both step 1 (CSV file format) and step 2 (data mapping) configurations.