Finally, we need to configure the data integrations asset, which allows us to connect everything by mapping what data gets ingested as which Dawiso attributes.
Download the full examples we used in this tutorial to follow along: - Recipe Manager (version data ingestion): Recipe Manager (Metadata Application).json - SQL script with the example database: Recipe SQL Script.sql
Here is the empty dataIntegrations template:
"dataIntegrations": [
{
"applicationKey": "app",
"dataSourceDefinitionKey": "data_source_definition",
"versionKey": "default",
"mappings": [
{
"queryKey": "",
"objectTypeKey": "",
"mapping": [
{
"fieldKey": "",
"attributeTypeKey": ""
}
]
},
}
],
| Property | Description |
|---|---|
applicationKey | Key of the application we are ingesting the data to. |
dataSourceDefinitionKey | Key of the data source definition. A data source definition specifies from where data is ingested and how. |
versionKey | Key of the provider version. Usually, the default value is used. |
mappings | Array of mappings that assign ingested columns to their corresponding Dawiso attribute types. This is necessary only for attribute types. All columns that are not identifier-based (name, key, parent object key) must be explicitly mapped for correct processing during metadata ingestion. |
Mappings
In the mappings property, we can assign all ingested fields (that aren’t identifiers like object names, object keys, etc.) to their appropriate attribute type counterpart. Every mapping has:
- A
fieldKeywhich is the name of the column in your database and - An
attributetypeKeywhich is the corresponding attribute type in Dawiso.
In the example package, the Recipe
| TABLE_NAME | COLUMN_NAME | Field Type |
|---|---|---|
| Recipe | RecipeID | Object key (Identifier) |
| Recipe | CuisineID | Parent key (Identifier) |
| Recipe | Name | Name (Identifier) |
| Recipe | Description | Attribute (core_description_scanned) |
| Recipe | Difficulty | Attribute (difficulty) |
| Recipe | LastMade | Attribute (recipe_last_made) |
"mappings": [
{
"queryKey": "recipe",
"objectTypeKey": "recipe",
"mapping": [
{
"fieldKey": "Description",
"attributeTypeKey": "core_description_scanned"
},
{
"fieldKey": "LastMade",
"attributeTypeKey": "recipe_last_made"
},
{
"fieldKey": "Difficulty",
"attributeTypeKey": "difficulty"
}
]
},
…
]
Save and Install the Package
Once you are done, Save the package and Install it. Now you can create your new data source.