JSON Master Data template
This file contains the definition of Data Hub entities (site, source, event, variable and user) and a configuration part driving the behavior of the MDE
{
"Account": {
"Id": 987,
"Name": "Acme customer"
},
"Config": {
"Whatif": false,
"CustomizationAssembly": "MasterDataCustomization.exe",
"UserSitesAndSourcesMergeMode": "Set"
},
"OpSite": {
"RootPath": "sites[*]",
"Items": [
{
"OpIdentifier": "opKey",
"Path": "LOC_ID"
},
{
"OpIdentifier": "opSiteForm.Master Data.Technical Identifiers.BusinessKey",
"Path": "LOC_ID"
},
{
"OpIdentifier": "opSite.Name",
"Path": "LOC_NAME"
},
{
"OpIdentifier": "opSite.PostalCode",
"Path": "POSTAL_CODE"
},
{
"OpIdentifier": "opSite.City",
"Path": "CITY"
},
{
"OpIdentifier": "opSite.Street",
"Path": "STREET"
},
{
"OpIdentifier": "opSiteForm.Master Data.Technical Identifiers.Range",
"Path": "STORE_RANGE"
},
{
"OpIdentifier": "opSiteForm.Master Data.Technical Identifiers.Surface",
"Path": "STORE_SURFACE"
},
{
"OpIdentifier": "opSite.TypeId",
"Transform": {
"Operation": "force",
"Value": "15"
}
},
{
"OpIdentifier": "opSite.TimeZoneId",
"Path": "TIMEZONE_ID",
"Transform": {
"Operation": "force",
"Value": "Romance Standard Time"
}
}
]
},
"OpSource": {
"RootPath": "sites[*].sources[*]",
"Items": [
{
"OpIdentifier": "opKey",
"Path": "MTR_ID"
},
{
"OpIdentifier": "opsource.SerialNumber",
"Path": "MTR_ID"
},
{
"OpIdentifier": "opSiteForm.Master Data.Technical Identifiers.BusinessKey",
"Path": "MTR_ID"
},
{
"OpIdentifier": "opsource.Name",
"Path": "MTR_NAME"
},
{
"OpIdentifier": "opSiteForm.Master Data.Technical Identifiers.Name",
"Path": "MTR_TYP_NAME"
},
{
"OpIdentifier": "opSiteForm.Master Data.Technical Identifiers.Acquisition",
"Path": "MTR_UNIT"
},
{
"OpIdentifier": "opSiteForm.Master Data.Technical Identifiers.Part",
"Path": "MTR_PART"
},
{
"OpIdentifier": "opsource.EnergyTypeId",
"Path": "ENERGY_NAME",
"Transform": {
"Operation": "Convert",
"KeyValuePairs": [
{
"Key": "ELECTRICITY",
"Value": "1"
},
{
"Key": "GAS",
"Value": "2"
},
{
"Key": "WATER",
"Value": "3"
}
]
},
"Validity": null
},
{
"OpIdentifier": "opsource.SourceTypeId",
"Path": "SOURCE_TYPE",
"Transform": {
"Operation": "force",
"Value": "77"
},
"Validity": null
},
{
"OpIdentifier": "opsource.GatewayType",
"Path": "GATEWAY_TYPE",
"Transform": {
"Operation": "force",
"Value": "7057"
},
"Validity": null
},
{
"OpIdentifier": "opsource.DisplayVariableTypeId",
"Path": "DISPLAY_TYPE",
"Transform": {
"Operation": "force",
"Value": "131"
},
"Validity": null
}
]
},
"OpUser": {
"RootPath": "users[*]",
"Items": [
{
"OpIdentifier": "opKey",
"Path": "EMAIL"
},
{
"OpIdentifier": "opUser.UserName",
"Path": "EMAIL"
},
{
"OpIdentifier": "opUser.Email",
"Path": "EMAIL"
},
{
"OpIdentifier": "opUser.FirstName",
"Path": "FIRST_NAME"
},
{
"OpIdentifier": "opUser.LastName",
"Path": "LAST_NAME"
},
{
"OpIdentifier": "opUser.Roles",
"Path": "ROLE",
"Transform": {
"Operation": "Convert",
"KeyValuePairs": [
{
"Key": "Data analyst",
"Value": "Manager"
},
{
"Key": "Service owner",
"Value": "Manager"
},
{
"Key": "Data manager",
"Value": "Manager"
},
{
"Key": "End user",
"Value": "User"
},
{
"Key": "Energy coordinator",
"Value": "User"
}
]
}
},
{
"OpIdentifier": "opUser.Language",
"Path": "LANGUAGE"
},
{
"OpIdentifier": "opUser.Claims",
"Path": "PROFILE",
"Transform": {
"Operation": "Convert",
"KeyValuePairs": [
{
"Key": "Admin",
"Value": "[{\"Name\":\"http://opisense.opinum.com/buildingproperties\",\"Value\":\"ADMIN\"},{\"Name\":\"http://opisense.opinum.com/sensors\",\"Value\":\"ADMIN\"}]"
},
{
"Key": "Expert",
"Value": "[{\"Name\":\"http://opisense.opinum.com/reports\",\"Value\":\"ADMIN\"},{\"Name\":\"http://opisense.opinum.com/tickets\",\"Value\":\"ADMIN\"},{\"Name\":\"http://opisense.opinum.com/buildingproperties\",\"Value\":\"NONE\"},{\"Name\":\"http://opisense.opinum.com/sensors\",\"Value\":\"NONE\"}]"
},
{
"Key": "Basic",
"Value": "[{\"Name\":\"http://opisense.opinum.com/sensors\",\"Value\":\"READ\"},{\"Name\":\"http://opisense.opinum.com/reports\",\"Value\":\"READ\"},{\"Name\":\"http://opisense.opinum.com/tickets\",\"Value\":\"READ\"},{\"Name\":\"http://opisense.opinum.com/buildingproperties\",\"Value\":\"NONE\"},{\"Name\":\"http://opisense.opinum.com/sensors\",\"Value\":\"NONE\"}]"
}
]
}
},
{
"OpIdentifier": "opUser.Sites",
"Path": "SITES[*].SiteName"
},
{
"OpIdentifier": "opUser.Sources",
"Path": "SOURCES[*].Serial"
}
]
},
"opEvent": {
"rootPath": "events[*]",
"items": [
{
"opIdentifier": "opKey",
"path": "name"
},
{
"opIdentifier": "opEvent.Name",
"path": "name"
},
{
"opIdentifier": "opEvent.Info",
"path": "info"
},
{
"opIdentifier": "opEvent.ToDate",
"path": "toDate"
},
{
"opIdentifier": "opEvent.FromDate",
"path": "fromDate"
},
{
"opIdentifier": "opEvent.Tags",
"path": "tags"
},
{
"opIdentifier": "opEvent.Site",
"path": "site"
},
{
"opIdentifier": "opEvent.Sources",
"transform": {
"operation": "list",
"value": ";"
},
"path": "sources"
}
]
}
}
The root object must contain 5 properties that define the Master Data structure and behavior.
- Account - The account Name and Id related to this template
- Config - The configuration context to apply when processing a Master Data Upload file
- OpSite - The location and structure of the site property in the Master Data Upload file
- OpSource - The location and structure of the source property in the Master Data Upload file
- OpEvent - The location and structure of the event property in the Master Data Upload file
- OpVariable - The location and structure of the variable property in the Master Data Upload file
- OpUser - The location and structure of the user property in the Master Data Upload file