Data Structure Definition
Overview
The Data Structure Definition screen allows you to view the list of Entities uploaded to Fynapse and delete individual Entites without the need to re-upload the Configuration Data JSON file.
For more details on the Data Structure, refer to Data Structure.
General Information
Uploading Data Structure Definition
Data Structure Definition is uploaded in the Configuration Data JSON file.
For a detailed structure of the JSON snippet, refer to Data Structure Definition section in Configuration Data chapter.
Data Structure Definition Constraints
The maximum numbers of user defined Entities stored in Fynapse in Finance Data Service is 50.
The definitions uploaded in a JSON file have to meet the following prerequisites:
Entity
- name:
- Has to be unique.
- Has to be composed using the following rules: start with letter, which can be followed by alphanumeric characters and an underscore.
- Has the maximum length of 128 characters.
- temporalityType - what kind of data are contained in this Entity:
- Reference - determines that the entity has a reference data type
- Transaction - determines that the entity has a transactional data type; these are accounting data that cannot be changed
- description - you can add an optional description
- type - determines what type of an Entity this is:
- ProtectedEntity - this is an entity which is created by the system when you define configurations that are necessary for the functioning of the system.
- DefinedEntity - this is an entity defined by the user, you can create as many or as little defined entities as required by your data architecture.
- primaryKeyAttributeNames - this is the definition of Attributes which will constitute the Primary Key and allow to identify the record in the system
The Primary Key has to:- Be unique
- Consist of only mandatory Attributes
- Consist of a minimum of 1 Attribute
- Consist of a maximum of 5 Attributes (this requirement is valid for Defined Entities only)
- Consist only of primitive attributes
When defining an Entity to be used as target for an extract, remember to add extractId to the Primary Key for Transaction type transient Entities to ensure correct deduplication of data. For more details, refer to Flow.
Attribute
An Entity has to have at least one Attribute.
Defined Entities can have up to 100 attributes (including Inline Entities).
- name - unique name:
- Has to be unique.
- Has to be composed using the following rules: start with letter, which can be followed by alphanumeric characters and an underscore.
- Has the maximum length of 128 characters.
- label:
- Has to be unique
- Has the maximum length of 128 characters
- No constraints on syntax
- mandatory - determines if an attribute is mandatory:
- true
- false
- type - determines whether this is a Primitive or a Complex Attribute:
- Primitive attributes:
- UUID
Please note that the UUID inputs are not generated automatically. You need to generate them either via a third party generator or in your upstream system and include them in the ingest file with the rest of the input data.
- BOOLEAN
- TIMESTAMP - the format used in Fynapse is: yyyy-mm-dd HH:mm:ss. This format is hardcoded and cannot be changed.
- DATE - the date format Fynapse is: yyyy-mm-dd. This format is hardcoded and cannot be changed.
- TEXT
- INT
- DECIMAL - the decimal attribute operates with the following parameters: scale 18 digits and precision 3 digits. This format is hardcoded and cannot be changed.
- HIGH-PRECISION DECIMAL
- Complex attributes:
- Inline Entity - this is an entity attribute type, i.e. a child entity nested within another entity.
- List - this is an attribute type which can store an ordered collection of data, primitive or complex, e.g. Inline Entities. The data contained within the List will be ordered in accordance with the order they were supplied to Fynapse. An example of this is a ‘person’ Entity with list of ‘children’, ordered from youngest to oldest.
A special example of this are Protected entities Journal and Journal Line, with Journal Entity containing a list of Journal Line Entities. Their order is determined by Fynapse.
- Primitive attributes:
Please note:
- InLine type complex attribute can only be defined as a nested attribute of a List type attribute; you cannot define InLine type attribute as a standalone attribute
- It is not possible to define a List type attribute as nested attribute of another List type attribute
Effective From
The Effective From date is a technical field that is mapped do a dateField defined in a Reference Entity.
If you don’t define a dateField in your Reference Entity or the dateField attribute is left empty in your ingestion file, a default Effective From date will be assigned by the system. This means that the Primary Key will be the only identifier of reference data and the newest version of the data, as identified off of the Primary Key, will be used for enrichment.
If you decide to populate the dateField, then when there are multiple versions of reference data the data with Effective From date effective at the time of the Posting Date of an ingested transaction event will be used for enrichment for this transaction.
For Defined Entities, Effective From date is mapped to the Systemic Field Date Type:
- Core Date for Journal Line Definition
- Effective Date for Business Event Definition
For Business Event Definition this is optional. If you don’t configure the Effective Date field, the Effective From date will by default use the current System Date during enrichment.
For Transaction type Reference Data Entities, the dateField works just like Core Date for Journal Line Definition and Effective Date for Business Event Definition, i.e. it is mapped to the Effective From date technical field and used during enrichment to add correct Reference Data to the ingested Transaction Event. If no dateField is configured for a Transaction type Reference Data Entity, the Reference Data are added based off the current system date.
dateField Code Snippet
Validations
Validations - you can define your own validations for Business Events
For more details, refer to Validations.
Examples of Attribute Definitions:
Primitive Attributes
Primitive Attribute: Text
Primitive Attribute: Int
Primitive Attribute: Timestamp
Complex Attributes
Complex Attribute: Inline Entity
Complex Attribute: List with a nested Inline Entity Attribute
Data Structure Definition Screen
The Data Structure Definition screen comprises the following sections:
- The work pane:
- The Refresh button - click it to check:
- If any new Entities appeared
- If any of the Entities were deleted
- If statuses of the Entities changed
- The Delete button - click it to delete a selected Entity from the database using the Schema Repository
Note that deleting an Entity cannot be reverted.
- The Delete all button - click it to delete all the Entities from the database using the Schema Repository
Note that deleting an Entity cannot be reverted.
- The Refresh button - click it to check:
- The grid - where you can see information about the Entities. One row in a grid represents one row in a database. The grid comprises the following columns:
- Entity name - a unique name of the uploaded Entity
- Entity status - a status of a particular Entity
Entities’ Statuses
- CREATE_REQUESTED - a request for creating an Entity in a database was sent
- CREATING - a temporary status displayed in the grid when creating is in progress
- CREATED - the Entity has been created
- CREATE_ERROR - an error occurred during creating the Entity
- DELETE_REQUESTED - a request for deleting the Entity from a database was sent
- DELETING - a temporary status displayed when deleting is in progress
- DELETED - the Entity is about to be deleted from the database. You will not be able to see this status because the row with the Entity you scheduled for deletion is also deleted from the grid.
- DELETE_ERROR - an error occurred during deleting the Entity
- UNKNOWN - the status of the Entity is not known. Contact the system administrator to find out more.
- EMPTY - no provisioning was requested
- EDIT_REQUESTED - provisioning request for EDIT was sent
Tutorials
How to Edit an Entity?
Currently, you cannot edit an Entity directly from UI.
- Go to System Configurations > Configuration Data.
- Upload a new Configuration Data JSON file containing the modified Entity using the Upload button.
- Go to System Configurations > Data Structure > Data Structure Definition. Click the Refresh button to see the new Entity in the grid.
How to Delete an Entity?
- Go to System Configurations > Data Structure > Data Structure Definition.
- In the grid, click the row containing an Entity you want to delete.
Note that deleting an Entity cannot be reverted.
- Click the Delete button.
- Confirm your action. The selected Entity will be deleted using Schema Repository from the database and as a result from the grid as well.
- Click the Refresh button to see the results of deletion.
How to Delete all Entities?
- Go to System Configurations > Data Structure > Data Structure Definition.
Note that deleting an Entity cannot be reverted.
- Click the Delete all button.
- Confirm your action. All Entities will be deleted using Schema Repository from the database and as a result from the grid as well.
- Click the Refresh button to see the results of deletion.