Creating a CSV Data Structure
- 19 Jul 2022
- 2 Minutes to read
- Print
- DarkLight
Creating a CSV Data Structure
- Updated on 19 Jul 2022
- 2 Minutes to read
- Print
- DarkLight
Article summary
Did you find this summary helpful?
Thank you for your feedback
Data Structure Quick Summary | ||||||
---|---|---|---|---|---|---|
Complexity? | Performance Impact? | Saves to Database? | Configuration Folder? | Entity Framework? | Folder Behavior? | Process Tracking? |
Low | Low | Yes | No | No | No | No |
Overview
Data Structures can be created from CSV data and can be deserialized and serialized using pre-built Flow steps.
Exporting CSV Data Structures [Database Stored]
CSV Data Structures [Database Stored] are saved to the database while CSV Data Structures are saved within Decisions as a Data Structure similar to Flow Structures. When exporting a CSV Data Structure [Database Stored], it does not transfer with data, only the structure itself exports. Data must be first exported with Flow logic or by the Import Data From CSV action.
Example
- In a Designer Project, select the CREATE DATATYPES/INTEGRATIONS button on the top action bar. Select XML/JSON/CSV and select Create Types from CSV.
- Enter a name in the CSV Structure Name field. The Namespace will automatically be populated.
- Select the First Row Is Field Names checkbox this is typically enabled since most CSV imports use header field names in the first row.
- Use the Separator dropdown to indicate what kind of separator is used in the CSV.
- In the CSV Structure field, enter "FName,LName,Email" as header field names separated by a comma. After the field names are defined, the CSV data can be pasted below them. Click CREATE.
Setting Name Description Read From File Creates the CSV data structure based on uploaded CSV file First Row Is Field Names Reads the first row of the uploaded CSV file as Data Structure column names Ignore Empty Rows Ignores empty rows found in the CSV file Separator Prompts specification of separator for parsing through data Create Database Table For Type Stores the CSV type in a database table - The Edit Defined Data Structure window will appear and display the header fields' names pre-populated into the data structure configuration. Click SAVE to create the Data Strucuture.
CSV Data Structure Steps
After a CSV Data Structure is created, the Deserialize From CSV and Serialize To CSV steps will be available in the Toolbox panel by navigating to USER DEFINED TYPES > CSV STRUCTURES > [NAME OF CSV STRUTCTURE].
Deserialize From CSV
The Deserialize From CSV step converts the data structure from a single serialized string into a more human-readable output with columns and values.
Setting Name | Description |
---|---|
File Type | Defines the file type of the input file (CSV, Excel, AutoSelect) |
Worksheet Index (displays if Excel file type is selected) | Defines the starting point of the data |
Separator | Defines the character separator in the input file for each data field |
Skip First Row | Skips the first row in the input file |
Ignore Empty Rows | Empty rows will be ignored |
Input File | Defines the input file |
Serialize To CSV
The Serialize To CSV step takes in the CSV data and serializes it into one string.
Setting Name | Description |
---|---|
File Type | Defines the file type of the output file (CSV, Excel, AutoSelect) |
Separator | Defines the character separator in the input file for each data field |
Include Field Names | Includes the defined field names in the output string |
For further information on Data Structures, visit the Decisions Forum.
Was this article helpful?