Generate Content Constraint from file¶
This functionality allows the user to create a content constraint just by uploading a CSV file. The “Generate CC from file” option is selectable from the utility menu
Once the user clicks on the menu, this window appears:
While the first two tabs are the same as the ones seen in the **Content Constraint ** paragraph, in the Load File tab the system displays the mask for acquiring data from CSV files. The required fields for loading from CSV file are:
File (mandatory)
Separator (mandatory, it is pre-set with “;”)
Delimiter (optional)
The user can load the file by clicking on the “Upload file” button and after loading the CSV it is possible to view the data (“Preview” button). Only after completion of the minimum and mandatory information, the System activates the save function using the Save button. The new content constraint will then be accessible in the “Content Constraint” section in the Meta Manager menu.
Hereby is a possible example of a CSV file used for CC creation. Considering that neither time_period or non-coded dimensions/attributes are considered while reading a file for CC creation, the user can create a simple csv file containing these columns:
the header must have the same names used as ids in the DSD declaration. Each column indicates the dimension/attribute with the items the user wants to allow in his content constraint. The example specifies that possible items for:
FREQ are “A” and “M”;
MARKET are “T”,”D” and “E”;
REF_AREA is just “IT”;
ADJUSTMENT is “N”;
INDICATOR is “TURN”;
ACTIVITY are “0040”, “0050” and “0080”;
BASE_PER is “2015”;
UNIT_MEASURE is “IX”;
SOURCE is “ISTAT”.
If this content constraint will then be used to validate the upload data operation (during the Loader step), an error will be shown if the uploaded file contains items that differ from the once allowed.
For example, given the rules described earlier, a row containing an item different from T,D or E for the MARKET dimension, will cause an error message like this:
It is also possible to download data from a dataflow and use it as input to generate the content constraint keeping only the information the user wants to use in order to create a CC.