Skip to main content Skip to footer

Search Crosser Knowledge Base

Crosser + UNS - Persist data from UNS in external database

In some cases, you want to persist data from your UNS in order to be consumed by external applications, store them for further analysis or visualize them in dashboards. To do that, you can simply create batches of data with the ‘Array Join’, either based on the message count or on a specified time interval. Afterwards, simply send the data array to your Insert module (MsSQL in this case) to insert the data from the array with one query instead of line-by-line. This will reduce the load in your database.

Crosser Example

Before joining the message, we have moved the property ‘topic’ to ‘data.topic’ so it becomes part of the dataset we insert.

Crosser Example

Tip: When you click on the bracket next to ‘data’, the array collapses and you can see the amount of objects within that array.

Crosser Example

Assuming you have configured the columns the right way, you should see entries in your database like below.

Crosser Example

Keep in mind to configure queues and retries to overcome downtime towards your database. You can also increase the ‘Command Timeout’ as part of your connection string in case your database is busy.

Example: Server=tcp:192.168.0.5;Database=crosser;User ID=demo;Password=crosser123;Encrypt=false;Command Timeout=600;

About the author

David Nienhaus | Senior Solution Engineer

David is a Senior Solution Engineer at Crosser. He has over 15 years experience working with software integration and digitization projects for critical infrastructure.
His engineering background gives him the understanding and focus needed to solve customer use cases in the most efficient and successful way.