With a datalayer, you specify how to edit and use a datastore.
In general settings, datalayers are created and maintained.
Existing datalayers are visible on this tab. Of each datalayer you see the following data:
- name datalayer
- creation date
- date on which the definition or content of the datalayer was last modified.
Click the ‘+ Add’ button to add a new datalayer.
The datalayer can be edited and duplicated by clicking on the gear icon.
Add
Complete all fields to add a datalayer.
Definition
Give the datalayer a unique name and description.
Select the desired datastore from the dropdown menu.
Creating
By defining columns, you choose which information from the datastore will be used in this datalayer.
Creating a column can be done by selecting the desired value from the dropdown.
If desired, it is possible to customize the name of the label.
Edit
Columns can be edited via the edit icon.
Options
This section allows you to manage which functionalities are available.
- Add and update:
This option updates records in the underlying datastore, if the key is present. If it is not, a new record is created. - Delete:
This option deletes records in the underlying store, if the key is present - Merge:
This option compares the underlying datastore with the supplied data. Records that do not exist in the datastore are created, records that exist are updated, and records that are missing from the supplied data are removed from the datastore.
Flowbuilder
With the Flowbuilder option, you specify whether the datamart is available in the flowbuilder.
Key API
The ‘Key API’ option is used to generate a record based on a key.
Note: Keep the Security Key secret.
It is possible to renew the Security Key.
Note: When renewing, the links based on the old Security Key no longer work.
EXAMPLE
Grant access to online content based on a product key
On this datamart, 2 keys are defined: subscription number and customer number. The user logs in to the website. After a successful login, the customer number is known. The website then calls the Key API of this datamart and passes the customer number as the key. The API then returns all records from the datamart belonging to this key (customer number). For example, PRODUCT A and PRODUCT C. The website gives the logged-in user access to only these products based on this information. |
Dataset API
The ‘Dataset API’ option returns the complete dataset.
EXAMPLE
Opening up a complete datamart for reporting or analysis
Connect to the API of this datamart via Power BI or another reporting tool to create the dashboard. |
API keys
To use this API authentication is needed via an Authorization header and a Bearer token. This token should be added to the HTTP request. For example: Authorization: Bearer b383ebef-3456-491c-ae14-9a6ec91e9d2c
Fieldnames
When calling a datalayer via an API, you can specify the casing of the field names via a parameter:
- PascalCase (also called CamelCase): where spaces are replaced by a capital letter
- SnakeCase (snake_case): where spaces are replaced by an underscore (_)
- KebabCase (kebab-case): where spaces are replaced by a dash (-)
- Default: which returns the field names as they are.
Paging
The pagesize can be specified, any value from 20 up to 100000 (100k) is accepted.
Example URL: https://campaign3-datamart-api.ternairsoftware.com/e81c3378-0006-444c-bda3-d0e5f348f077/data?page=1&resultformat=json&fieldnames=pascalcase&pagesize=100
When you have defined everything, save the datalayer by clicking the ‘Save’ button.
Delete
Note! If you delete the datalayer, all processes using this datalayer (selection and APIs) will return an error message. This action cannot be undone.
Authorizations
It is possible to assign access rights to the datalayer through the authorizations in the general settings. If access to the datalayer is disabled for a user group, it is not possible for users to open the selection.