Datacenter User Guide
Version 2.1 | Published April 03, 2024 ©
File
This section provides the steps to configure a File dataset.
-
Create a new dataset of type File, specifying a name and (optionally) a prefix to use to identify the dataset and its values, respectively:
-
Click Add. The dataset is added to the list, and it has an initial WARNING status as it contains no source file yet.
-
You can now select a source file from the table in the Dataset configuration panel, by double clicking one of its rows. The table lists all recently used files.
Alternatively, you can type a file location in the input box at the top of the table and press the plus sign. The file is added to the dataset source, and included in the Files table for future reference.
The input box supports autocomplete, listing the files in the folder alias that were setup while configuring the File provider in the Admin page.
Datacenter supports the following file types:-
Text (These are key-value pairs, using the '=' or ':' char as separators. The separators can be mixed.)
-
Ini-file
-
JSON
-
CSV (comma-separated)
-
TXT files accept two separators: '=' or ':', which can be mixed. White space added after the separator, is preserved in the value. White space added before the separator is stripped from the key.
Editing Recently Added Files
The table in the Dataset configuration panel lists all the recently added files. When adding a file, its values are set to default.
Follow these steps to edit those properties:
-
Click on the file you want to edit, the corresponding row is highlighted in blue:
-
Edit the properties listed, such as Name and Description.
Working with CSV Files
When adding a CSV file, Datacenter attempts to read the keys from the first column in the file, and the values from the second. T o change this behavior, click on the filename in the Dataset Configuration panel:
Change the Keys Column or Values Column options in the Setup Panel.
Filtering a Dataset
Values read from a file into a dataset, can be filtered via the Filtering tool. To do so, select the dataset card, click on the hamburger menu and then press the Filter button.
A dialog visualizing the file's payload schema opens, where a user can filter the source data.
Please refer to the Filtering and Manipulating the Dataset Entries page to learn how to enable, disable and edit the entries added.