Solved

How to update OPC-UA extractor config file on the fly

  • 14 August 2023
  • 2 replies
  • 40 views

I am looking for a way to update the extraction.id-prefix field inside the OPC-UA extractor config file after partially starting data extraction. Basically, I need to be able to store data in CDF raw with External ID prefix set to a particular tag value coming from the OPC server. So I would need to read the timeseries value of that particular tag from the OPC server and set this value as id-prefix in the extractor config file before pushing subsequent data to CDF raw.

Since the pre-built OPC-UA extractor works well for our use case, I am looking for ways to use it as is without having to implement a custom extractor. What would be the best way to implement the functionality mentioned above using the OPC-UA extractor?

(Attn. @Jatin Sablok )

icon

Best answer by Einar Omang 14 August 2023, 07:56

View original

2 replies

Userlevel 2

This is too specific a feature to be something that the OPC-UA Extractor is capable of being configured to do.

If you really need this functionality, and can’t work around it, you might be best off modifying the extractor code itself. The OPC-UA extractor is open source, https://github.com/cognitedata/opcua-extractor-net. At https://github.com/cognitedata/opcua-extractor-net/blob/2eb0613313f1a866c8c5141740282b7f009c5205/Extractor/UAExtractor.cs#L343, or so, the extractor is in a state where you could read from a node in OPC-UA using uaClient.ReadRawValues, and update the Config object.

Userlevel 3

Hi @Anand Sankar Aananthakrishnan, did Einar’s answer help you? If yes, you can mark it as the best answer :) 

Reply