Extract Action group
This topic describes the Procedure Actions included in the Extract Action group and their specific properties.
The Extract Actions allow you to extract data from Board into delimited text files. These steps are useful for different use cases such as upgrading to a new Board version, performing a Regression test or a simple backup.
The Extract Action group offers the following steps:
- Extract Cube. This step allows you to extract the values of a desired Cube to a text file, similar to what happens when you extract a Cube from the "Cubes" section of a Data model.
To configure this step, choose the desired Cube in the “Cubes” drop-down list. Board will automatically enter the name of the extracted file as “Cube CubeName.txt” in the “Path/File” field. The filename can be changed manually if needed.
After selecting a Cube, a list of the Entities related to the dimensions of the Cube is displayed. The list contains the full hierarchies that include the Entities selected in the Cube structure (see Creating a Cube for more details).
Drag and drop the Entities in the grey area to extract the values for their members in the text file. The chosen Entities will be displayed as columns of the text file, in the same order as shown in the list. You can change their order by dragging and dropping them as desired.
If no Entities are selected, then the Entities of the Cube structure will be extracted
The “Floating point” option is meant only for numeric Cubes. If enabled, the Procedure step will extract the values in the floating-point data format, which will have all decimals digits in most cases. If this option is disabled, the extracted values will only have a maximum of 5 decimals digits.
Enable the “Tab delimited” option if you want the values in the extracted file to be tab delimited
- Extract Entity. This step allows you to extract all members of a selected Entity into a text file, similar to what happens when you extract an Entity from the "Entities" section of a Data model.
To configure this step, choose the desired Entity from the drop-down list. Board will automatically enter the name of the extracted file as “Entity EntityName.txt” in the “Path/File” field. The filename can be changed manually if needed.
Enable the “Tab delimited” option if you want the values in the extracted file to be tab delimited
- Extract Tree. This step allows you to extract the hierarchy of a desired Entity and its relationships into a text file.
To configure this step, choose the Entity from the “Tree” drop-down list (only the least aggregate Entity for each hierarchy is included in the list). Board will automatically enter the name of the extracted file as “Tree EntityName.txt” in the “Path/File” field. The filename can be changed manually if needed.
Enable the “Tab delimited” option if you want the values in the extracted file to be tab delimited
- Export Data View to file. This step allows you to extract a Data View into a text file.
To configure this step, choose the file’s delimiter character from the “Delimiter” drop-down list, then configure the Layout of the Data View and specify the name and extension of the extracted file in the “Path/File” field.
Enable the “Header” option to include the column headers of the Data View in the extracted file
- Export layout to XML. This step allows you to configure a Layout and extract its result into an XML file.
To configure this step, configure the desired Layout and specify the name and extension of the extracted file in the “Path/File” field.
The resulting XML file will have a flat structure by default, meaning that the XML tags of rows and columns are repeated for each cell.
If you enable the “Grouped Rowset”, the resulting XML file will have a grouped structure, meaning that the XML tags of columns are nested within the rows
For all the steps described above, the extracted files are created in the directory “Board\Dataset\DataModelName” by default. You can choose another path by manually entering it in the “Path/File” fields before the file name (i.e. D:\MyFolder\Customer.txt).
You can also insert Windows variables (%userprofile%\Desktop\Customer.txt) as well as substitution formulas (%userprofile%\Desktop\Customer_@username.txt) in the filename.
In addition to the text file, Board also generates a structure definition file with the same name and a ".cfg" extension: this file contains names, starting positions, and lengths of the fields included in the extracted text file. This information is useful to have Board automatically generate a Data Reader protocol capable of reading and importing the contents of the extracted text file.
When a Procedure starts, the range or scope of execution on the Entities is inherited from the Select and the Pager selections of the screen from which the procedure is launched. These inherited selections will be combined with the Procedure selections.
In order to replace any prior selection, add a new "Remove all selections" step or tick the option "Reset all previous selections" when adding a new "Select" step in your Procedure.
If the Procedure is run directly from the Data model, the Screen selections are not carried in. The Procedure will start with a full selection instead of the Screen selections made on the Screen where it is usually triggered from.
All steps above support the following Substitution formulas in the “Path/File” field: @User, @UserName, @Database, @ProcedureId, and all the @Date variants except @Datetime.
In addition, environment variables such as %bss% can also be used in the “Path/File” field.
In the case of a Capsule Procedure, a Data model drop-down menu on the upper right corner allows you to select the Data model on which the Procedure step will be executed, except in cases where the Procedure step has specific options that act on other Data models (for example, the "Save Pending Changes to Disk" step in the "Advanced Action Group" can be configured to act on all Data models or only on the Data model where the Procedure resides).