Data Model pane
The Data Model Pane displays a Data Model used to help design the template, along with (optional) data. When you open or create a data mapping configuration (see Data mapping configurations) or directly load data (see Loading data), the resulting record set is loaded in the Data Model pane. The information shown is the information for the current record within the record set.
Data is displayed as a tree view, with the root level being the record table, levels below it being detail tables, and any level below being called "nested tables".
Nested objects in JSON data are displayed on successive levels in the Data Model.
Filter
To find a certain table, group or field in a large Data Model, start typing characters in the Filter box. This immediately narrows down the list of displayed items to all tables, groups and fields whose name or value contains the characters that were typed. Note that the filtering is case-insensitive.
Data Model toolbar buttons
-
JSON Sample Data: Opens a dialog to load JSON sample data in the Data Model pane; see Adding JSON sample data.
Tip: If a data field contains JSON data you could use that data as sample data: right-click the field, select Copy to copy the JSON data to the clipboard; then open the JSON Sample Data dialog and paste the data there.
- Synchronize Fields and Structure: Click to synchronize the Data Model fields and structure in the currently loaded template and data mapping configuration. If you click this button when working on the data mapping configuration, the Data Model gets updated to the one in the template. If you click it when working on the template, the Data Model gets updated to the one in the data mapping configuration.
- Sample data file: Hover over the button to see the name of the currently active sample data file. Click the down arrow and select a sample data file to quickly switch between available sample data files.
- Collapse All: Collapse all fields on the record level, in all detail tables and in all groups.
-
Import Data Model: Click to browse to a file that contains a Data Model. This may be:
- A Data Model file (*.OL-datamodel).
- A JSON file (*.json; see the note below).
- A Connect template (*.OL-template), data mapping configuration (*.OL-datamapper) or 'typed' JSON file (*.json; see the note below).
The file's data model structure will be displayed in the Data Model pane without data.
-
Export Data Model: Click to browse to a location to save the Data Model file. The available file types are:
- A Data Model file (*.OL-datamodel).
- A JSON file (*.json): A JSON object or an array of JSON objects representing records.
- A 'typed' JSON file (*.json).
Note: Typed JSON follows the structure of a JSON Record Data List (see the REST API Cookbook). Data field types are determined by the
schema
object in the JSON.
When a Data Model is exported to a JSON file or typed JSON file, detail tables are exported, but groups are not. -
Show/Hide ExtraData fields: This icon is only visible if the View ExtraData option has been checked in the Preferences: Window > Preferences > Data Model.
ExtraData fields are not meant to be filled via an extraction. They were originally intended to be used in a Workflow configuration to add data to the Data Model (see Adding fields and data via Workflow).
Nowadays, runtime parameters are the preferred way to pass data at runtime to a data mapping configuration (see Properties and runtime parameters) or template (see Runtime parameters). - Minimize/Maximize: Click to minimize or maximize the pane. See Moving and Merging Panes.
Browsing data
When a Data Model is loaded in the Data Model Pane, it can be used to design templates by dragging fields directly into the template; see Variable data in the text.
If data is present (from a data file or a data mapping configuration), it is possible to preview the resulting data in the template on the Preview tab (see Workspace).
You can use the following keys to browse records in the Data Model pane:
-
Page Up: next record
-
Page Down: previous record
-
Home: first record
-
End: last record.
The way the Data Model is displayed can be changed via the following options in the contextual menu. Right-click the Data Model to open the contextual menu.
-
Collapse All: Collapse all fields on the record level, in all detail tables and in all groups.
-
Expand All: Expand all fields on the record level, in all detail tables and in all groups.
The record, detail tables and groups can also be expanded and collapsed using the arrow icon next to them.
Tip: Right-click a field and select Copy to copy its contents to the clipboard.
Changing the Data Model
By adding fields to a Data Model, setting their type and entering a (default) value, you may construct or modify a Data Model without having to create or open a data mapping configuration. This is especially useful when a solution does not require a data mapping configuration.
It isn't possible to enter data in a Data Model directly, but you could add JSON data (see Adding JSON sample data).
Modifying a Data Model can be done via the contextual menu. To open it, right-click the Data Model.
-
Add Field: Click to add a new field at the current level (record or detail table). Enter the field name in the dialog; if you want you can change the field's data type and set a default value. Then click OK to add it to the Data Model.
-
Add Table: Click to add a new detail table at the current level (record or existing detail table). Enter the table name in the dialog and click OK to add it.
-
Add Group: Click to create a new group at the current level (record or existing group). Enter the group name in the dialog and click OK to add it. Any selected fields will be added to the group. (See also: Ordering and grouping fields in the Data Model.)
Note: Rename, Delete and Set Type are only available for newly added fields, and when data have been loaded from a file, without a data mapping configuration.
-
Rename: Click to rename the selected table or field. Enter the new name and click OK to rename.
-
Delete: Click to delete the selected table or field.
-
Set Type: Use the list to select the field type (see Data types).
-
Ungroup: Delete the selected group. The fields in the group will be moved up one level in the Data Model.
-
Default Value: Click to set the default value for a field.
-
Move: Click to move the selected field within the current level (record or group) in the Data Model. (See: Ordering and grouping fields in the Data Model.)
-
Top: Move the field to the first place.
-
Up: Move the field one step up.
-
Down: Move the field one step down.
-
Bottom: Move the field to the last place.
-
-
Copy: copy the field's contents to the clipboard.