i4connected Knowledgebase 5.6

Configuring StreamInsight Queries

Abstract

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-click and Edit Top 200 Rows.

    Capture1153__1_.jpg

    Tip

    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.

    Capture1154.jpg
Configuring the Adapter Host
  1. Go to C:\Program Files\WEBfactory\DataWarehouse\Server and 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" />
    Capture1156.jpg
  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-click and Edit Top 200 Rows.

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

    Capture1157.jpg
  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.

    Capture1159.jpg
  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.