Skip to main content

i4connected Knowledgebase 5.6

Configuring StreamInsight Queries


Check out this article and learn how to configure StreamInsight Queries and the necessary procedures for enabling them and setting up the adapter host tables.

This guide will describe the procedures required for enabling queries and setting up the adapter host tables in Microsoft SQL Server Management Studio.

Enabling the queries
  1. Open Microsoft SQL Server Management Studio and connect to the database server.

  2. Go to Databases/WEBfactory.DWH.Data.Database.ACME and expand the Tables structure. Open the dbo.StreamInsight.Queries table by means of right-clicking and Edit Top 200 Rows.



    The dbo.StreamInsight.Queries table features the following queries:

    • The first query, DWH Cti Query is a default query that should be active.

    • The second query, DWH Measurements Raw Query will output every measurement value into the database.

    • The third query, DWH Alarms Query will output all alarms to the database.

  3. Make sure that all the three queries of the table are enabled.

Configuring the Adapter Host
  1. Open the WEBfactory.StreamInsight.Server.config configuration file.

  2. Find the <modules> tag and ad inside the new module for our adapter:

    <module assemblyFile="WEBfactory.StreamInsight.Adapters.WF.dll" moduleType="WEBfactory.StreamInsight.Adapters.WF.WEBfactoryModule, 
    WEBfactory.StreamInsight.Adapters.WF" moduleName="WEBfactory" startupLoaded="true" />
  3. Next, copy the libraries for the adapter to the StreamInsight Server folder.

  4. In Microsoft SQL Server Management Studio, open the dbo.StreamInsight.AdapterHosts table to edit the Configuration by means of right-clicking and Edit Top 200 Rows.

  5. The Server Address must point to the web services (ex. server address="http://localhost/_SERVICES/WEBservices").

  6. For each signal, there must be defined an XML entry specifying the logID and the name:

    1. the logID (the source) must be obtained from the dbo.Logs table from the database;

    2. the name (the target) is the signal name of an existing signal in the i4connected project.

  7. Next, run the script to update the database with the new configuration.

  8. Enable the Adapter Host by switching the Enabled value to True.