Skip to content
  • There are no suggestions because the search field is empty.

Importing Bridge Configuration into the DataHub

Is there a way to import the Bridge Configuration into the DataHub?

Bridging Script:

The bridging script is called BridgeCSVReader.g and the CSV is called DataHubBridges.csv. Both files should be placed in the "C:\Program Files (x86)\Cogent\Cogent DataHub\scripts" directory. The CSV file takes the source as the first tag and the destination as the second tag. Both need to be fully qualified names, meaning DataDomain:TagName. You should not need to modify the script. There is one line that is below that controls the direction of the bridge.  You may want to change this setting.

datahub_command(format("(bridge \"%s\" \"%s\" 259)", sourceTag, destTag));
  • 257 means Forward Only
  • 258 means Inverse Only
  • 259 means Bi-directional

Adding and Running the Script:

Open the DataHub property page. Go to the Scripting section. Click Add and browse to where you placed the script. We recommend putting it in the "C:\Program Files (x86)\Cogent\Cogent DataHub\scripts" directory. Once you have it added to the list simply highlight it in the list and click Load Now. This will load the script, read the CSV file and create the bridges.