Twin Config
The DataDistributionModule twin configuration has two separate sections:
Measurement routing (dataDistConfig): Always required, and defines how measurements are routed to cloud.
Local historian configuration (localHistConfig): Only required if measurements are routed to a local historian.
An example of the twin configuration looks like this:
"dataDistConfig": {
"coldPathUploadMode": "SingleFile",
"defaultColdPathSyncMin": 10,
"zipColdPathOutput": false,
"enableIngestionProperties": false,
"ingestionProperties":
{
"kustoDatabase": "TimeSeriesProd"
}
},
"localHistConfig": {
"assetHierarchyId": "71f0853f-785c-4201-8411-250fd27f77a2",
"enableLocalHistorians": true,
"historians": [
{
"name": "Historian",
"id": "19d3a178-407d-42b8-8717-71ebcbbec2b4",
"historianType": "TimeScaleDb",
"hostAddress": "localhost",
"port": 5432,
"databaseName": "postgres",
"username": "postgres",
"password": "somesecret",
"storeFrequencyMaxMins": 0,
"storeBatchSizeMax": 0
}
]
}Routing Configuration
The "dataDistConfig" section of the module twin configuration sets how the DataDistributionModule uploads measurements to the cloud. The section has the following properties:
coldPathUploadMode: Determines how measurements are uploaded to cloud when routing using cold path. Options are:
"SingleFile": Measurements are stored in a single file for each batch.
"FilePerTag": Measurements are stored in separate files for each tag.
defaultColdPathSyncMin: Default cold path upload rate, in minutes.
zipColdPathOutput: Boolean property that determines if cold path files should be zipped before uploading to cloud, to optimize the bandwidth.
enableIngestionProperties: Boolean value that, if true, applies the ingestion properties to all cloud-bound measurement routings.
ingestionProperties: The ingestion properties is an array of string key-value pairs, that are attached to both hot- and cold path measurement uploads. The properties are used up by the measurement ingestion mechanism, in the cloud, and passes information to it. For example which database to save the measurements to.
Local Historian Configuration
The "localHistConfig" section of the module twin configuration sets the connection properties for any local historians.
The section has the following properties:
assetHierarchyId: Determines how measurements are uploaded to cloud when routing using cold path.
enableLocalHistorians: Default cold path upload rate, in minutes.
historians: Boolean property that determines if cold path files should be zipped before uploading to cloud, to optimize the bandwidth.
name: Name of the historian.
id: The guid of the data connector in the asset hierarchy.
historianType: The type of historian. Currently only "TimeScaleDb" is supported.
hostAddress: The host address for the historian.
port: The port of the local historian.
databaseName: The name of the database to store measurements.
username: Username for logging in to the local historian.
password: Password for the local historian.
storeFrequencyMaxMins: Maximum interval between storing batched measurements, in minutes. A value of 0 disables batching, and ensures measurements are stored directly.
storeBatchSizeMax: Maximum batch size storing measurements to historian. A value of 0 disables the evaluation of batch size.
Last updated
Was this helpful?