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

Import Tag List and Values from CSV File into the DataHub

Is there a way to import a list of tags and their values into the DataHub?

The following script and .csv file give an example of how importing a list of tags and their values into the DataHub is possible through the scripting engine. Add your own tags to the CSVTagWrite.csv in the following format: Domain, TagName, TagValue. You do not need to include the colon between the Domain and TagName. The periods within the "channel.device.group.tag" TagName must be included. 

If you are not using the default install directory for the DataHub, you will need to edit the filepath for the CSVTagWrite.csv within the script. 

Running the Script

First, download both of the files below and place them within the DataHub script directory(Default is ...Cogent\Cogent DataHub\scripts). Go to the Scripting section in the DataHub.  Then click Add and the script.  Then you can highlight the script and click Load Now to load the script once.  Or you can check the box next to it and click apply to make it run on every start up and then restart the DataHub to load the script.

If you are currently connected to your OPC Server and devices, importing this CSV file will write the values to any tags specified. Software Toolbox is not responsible for any losses/damages that may occur by using this script.