Create a Mapping Definition Manually
If creating the mapping manually, the source dataset is not required to be ingested first; however you need to know what the source fields are.
Before you begin
You need:
- An entity model
- At least one source dataset
About this task
Procedure
Example
The following example shows a mapping definition that directly assigns the value of a field to the entity property, uses a custom sumFunction
to calculate the value, and includes a conditional expression to determine the value.
{
"language" : "zxx",
"name" : "MyFlow-MyMappingStep",
"description" : "",
"version" : 1,
"targetEntityType" : "MyEntity-0.0.1/MyEntity",
"sourceContext" : "/",
"sourceURI" : "",
"properties" : {
"id": {
"sourcedFrom": "CustomerID"
},
"sum": {
"sourcedFrom": "sumFunction(Number, AnotherNumber)"
}
"customerPriority": {
"sourcedFrom": "if (LifetimePurchases gt 500000) then 'Pri1'"
}
}
}
What to do next
Add the name and version of the mapping definition to your mapping step and run the flow. Example:
"mapping" : {
"name" : "MyFlow-MyMappingStep",
"version" : 1
},