Get File Data
Get File Data action enables you to pull in tabular data from an Excel/CSV file and map it to a process variables. This will allow you to use data coming from external files in process flows.
You can proceed with the action configuration by manually creating the structure of the file (header) that will be uploaded.
You need to map the file structure created to a process variable which will give you the possibility to use the data in other actions in process flows.
Go to the Process Designers section and open a new or an existing process. Actions configuration can be performed once they are dragged and dropped on canvas.
Video on how to configure Get File Data is available here.
Step 1: Drag the Get File Data action from Toolbar and drop it on canvas; click on the action to open the Properties Panel.
Step 2: You can edit the Action Name.
Step 3: Click on Mapping Configuration (Not configured) card to go to the action configurations steps.
Step 4: Get File Data configuration
File to Process: select the process variable that will fetch your file details when kicking off the process flow. You can select the file type variable from selector (if created upfront) or you can click on "+Create new variable" to create a file type variable;
- mandatory: type = File;
- set as Input.
Store data as: select a process variable that will be storing the data at runtime, data that is pulled from the uploaded file. You can select the process variable from selector (if created upfront) or you can click on "+Create new variable" to create a data model type variable;
- defining the process variable is essential as it will store the data when the process in running, and you can use this data further in processing.
- mandatory: type = data model with attributes that will be mapped to your file structure; you will further map columns to selected data model's attributes.
- mandatory: process variable defined will be a list as your file may contain more than 1 entry.
Step 3: Add column: start building the structure of your file by pressing "Add column". In "Column Name" add the name of the corresponding column in the file that will be processed; in "Map Data" add the attribute that will be mapped to the column (attributes of data model selected in Step 1).
Step 1: Based on the file that will be used in processing, the first step is to create a data model with attributes following the external file's structure:
- external file structure
- data model created - in this case, named "TeamDetails"
If the file to be imported - has duplicate column names - only the first one will be imported.
Step 2: Create the process variables needed for this action:
Step 3: In process designer, drag and drop a Get file data action on canvas and open the configuration panel.
Step 4: Configure the action:
- File to process: the file type process variable created. i.e. fileToProcess
- Store data as: the process variable type data model, i.e. teamDetailsData ("teamDetails" data model created at step1)
- Add columns and map the file's header columns to the data model's attributes
"Column name" in the configuration panel must match the name of the columns in your external file in order to have a correct action configuration.
Step 5: Save, Validate and Run the process. Upload your file:
Run the process. In Instances you can check now the output of the action, data being available in a JSON format. You can now use this process variable further in other actions within actions. This is how the Get file data action enables you to pull in tabular data from an Excel/CSV file and map it to a process variable. This will allow you to use data coming from external files in process flows.