Importing and Exporting Data From Data Structures
  • 24 Aug 2021
  • 5 Minutes to read
  • Dark
    Light
  This documentation version is deprecated, please click here for the latest version.

Importing and Exporting Data From Data Structures

  • Dark
    Light

Article summary

Overview 

Data Structures have the added benefit of being movable; that is, if a user needs to move a Data Structure and/or its data to another environment, they can. The data can be exported as a dec.obj file via a simple action on the Data Structure itself, and can be easily imported into another system. Additionally, Decisions allows users to export the data from database stored data types, to an Excel file. However, due to the complex nature of some Data Structures, it is not advised to import and export all Data Structures the same way. For more complex types, users have the option of attaching the Data Structure to an existing project and just importing and exporting the entire project, rather than just the structure or data itself. 

Example

Importing/Exporting a Data Structure 

Exporting a Data Structure

  1. To export a Data Structure, begin by navigating to and right-clicking a Data Structure. Then, navigate to Import/Export > Export

  2. Selecting this option will bring up the Select Project panel. From here, users will be asked if they wish to tie the Data Structure to an Existing Project, or if they wish to create a new one.
  3. If a user selects Create New, they must name the project via the Enter New Project Name box, and then select Continue
  4. If they choose a pre-existing one, the user must select one of the listed options before clicking Continue.

  5. From the next panel, users are then offered several options regarding the manner in which the project is exported in.  
  6. Download the Data Structure by itself via Download Single Item, the entire connected project, by clicking Download Project, or the project and all its dependencies via Download Project with Dependencies.  
  7. After selecting an option, click Continue to proceed to the download panel.

  8. The download panel will display the item selected for download. 
  9. Selecting Download will then export the file, and download it to the default download location.
    Note
    Exporting the Data Structure alone will export the file as a decObj. If more than one file is attached to the file, it will export as a .zip file.

Importing a Data Structure

  1. To import a data structure into a Decisions environment, simply navigate to, and right click a Designer Folder. Then, navigate to Import/Export > Import.

  2. Next, either click Choose File, or drag and drop in either the Data Structure or a project containing the Data Structure, to begin importing the file. 

  3. From the Import Entities panel, select Complete Import to import the file.
    Note
    To exclude select items from an import, click Choose Items to Exclude from Import. Then select which items to exclude by clicking their respective check boxes and then selecting Exclude Selected. In contrast, to choose which items to include in the import, select Include Selected. Afterwards, select Continue Import to return to the primary Import Entities screen.

  4. The imported Data Structure will appear in the environment in the Folder that the import action was performed on.

Importing/Exporting Data 

If a user wishes to Import or Export Data for a database stored data type, they may do so with the Import/Export Data options. 

  1. Begin by right-clicking database stored datatype; from here, hover over Import/Export Data to expose the following options:
    Create/Edit Data:Allows the user to create new pieces of data, or edit pre-existing data columns.
    Export Data To CSV:Exports the data to an Excel spreadsheet.
    Import Data From CSV:Imports the data from an Excel spreadsheet, into the data type in Decisions.

Exporting Data

  1. To export data from a data structure, navigate to Import/Export Data > Export Data To CSV
  2. From the next panel, select the desired Field Names to be included in the spreadsheet. 
  3. To select or de-select a field, click on the checkbox beside each of the Existing Entities
  4. Once the Field Names are chosen, click Download Existing Entities

  5. From the Exports panel, select Download Sample/Export File to download pre-existing data to a spreadsheet (this file will download to the default download destination). 
  6. If this is not the desired action, or if there was an error in configuration, users may select Close to cancel the export and close out the panel.

Importing Data 

  1. To import data from a CSV file, first navigate to and right-click a Data Structure. 
  2. Then, select Import/Export Data > Import Data From CSV.
  3. Selecting this feature will pull up the Pick Fields panel. 
  4. From here, users may select which Data Fields to include in the CSV. This can be configured by toggling the Checkbox for each desired field, or by selecting Select All to choose all fields.
  5. After the desired fields have been chosen, click either Get Sample File or Download Existing Entities; this will navigate to the Get Sample screen. 

  6. From this screen, users may either import or export a sample file via the buttons on the panel. These buttons function as follows:
Note
To import a CSV file users must first choose a file via Upload File To Import, before selecting Import Data. The step will not progress without a selected file.
Download Sample/Export File:Downloads a sample file containing pre-existing data pertaining to the Data Structure.
Edit Data:Allows the ability to edit pre-existing stored data for that structure.
Upload File To Import:Brings up a file uploader, allowing the ability to upload a CSV file containing Database Structure data, via drag and dropping, or selecting Choose File.
Import Data:Uploads and imports data from a CSV file to a Data Structure's table.

Note
Though users in Decisions have the ability to import/export database stored data from one instance into another, it is not always an advised practice. For some more complex data types, it may be advised to export the data with the entire project, rather than by itself. For more info reference the table below.
Data Structure Type Can the data be exported by itself? 
Database StructureNo, the data cannot be moved to another server.
Database Structure (Leased)No, the data cannot be moved to another server.
EntityYes
External EntityYes, but it is advised to export with the project 
Entity Extension Yes, but it is advised to export with the project 
Folder ExtensionYes, but it is advised to export with the project
Flow Execution ExtensionYes, it is advised to export with the project, data can be exported but requires using the save/create step to recreate the proper parameters.
Case Entity Yes, it is advised to export with the project, data can be exported but requires using the save/create step to recreate the proper parameters.

Was this article helpful?