Home : Products : Hach WIMS : Interfaces : Hach WIMS Direct Server-Side Interface to Narrow Format OLEDB Source : Documentation : Topics specific to the operation of this interface : Configuration - Source Configuration Q12160
Q12203 - INFO: Configuration - Source Configuration Q12160

In order to configure the source connection from the interface, click Configuration and select Source Configuration.

The next screen will display parameters such as Data Source, UsernamePasswordConnection and Command Timeouts, and allow you to Test Connection. The Source Configuration screen has two tabs: one to setup the connection to the database and the other to define the table mappings/cross references.

Database Connection - Configure the settings needed to connect to your database

  • Configuration Template - no templates are currently defined. Choose 'User Defined' to setup a connection to your database.
  • Data Source - this field specifies, in loose terms, the "Database/Datasource server name" where your database system is configured to store data. "Database/Datasource server name" means different things depending on whether you are running against Oracle or MS SQL:
    • Oracle - you can type in either the Oracle TNS name or a string in the form of host:port/SID, if using the Oracle HOSTNAME adapter.
    • MS SQL - this is in the form of host\sql_instance_name
  • Database Name - the name of the database that you are connecting to.
  • DBMS Type -select the appropriate type of your Hach WIMS database
  • OLE DB Provider - this specifies which "database driver" the interface will use when connecting to your database and again depends on the database type:
    • Oracle - the default string should be fine
    • MS SQL - if connecting to MS SQL 2005 or later, use the native client to connect. Specify SQLNCLI as the provider. NOTE: You will need to have the Microsoft SQL Native Client installed for this to work. If connecting to MS SQL 2000, specify SQLOLEDB as the provider.
    • MS Access - add the full path and file name of the MS Access MDB file to Data Source
    • ODBC - need to create a System DSN (Data Source Name) to connect to MS Access-type database
  • Username - The username you want to use to connect to the database. This user should have permission to access the database and tables that contain data.
  • Password - The password that will be used to connect to the database
  • Connection Timeout in Seconds - how many seconds the program should wait when establishing a connection to the Hach WIMS database before aborting.
  • Command Timeout in Seconds - specifies how many seconds the program should wait for a query to complete before aborting the operation.
    WARNING: Large values for these two settings can cause the program to not respond for a long period of time! Do NOT use 0 unless you know what you are doing - it will cause the program to wait indefinitely, and if your database server is down, the only way to cancel the operation is to forcefully quit the program.
  • Customizations - this should be left empty unless you were told otherwise by a Hach Support Engineer or you know what you are doing.

 

Table Mappings - Allows you to tell the interface which fields in the database table contain the Date, Tag, Value and optionally Source. The interface needs to know which column in the table contains the date field, which column contains the tag, which column contains the value/data and if the tag is not unique then a table column that contains the source. The interface allows you to retrieve data from one or more tables. Each table that you configure needs to define the column mappings.

  • Select Table - Allows you to pick a table that you want to modify or test
  • Add Table - Adds another table that the interface can collect data from. You need to click 'Add Table' before beginning to type in your table mappings. When you click 'Add Table' it will create a table that you are then able to set it up to import data from.
  • Remove Table - Removes the currently selected table
  • Narrow Table Format - The interface supports two types of table configurations: one with date, tag and value columns and one with date,source,tag and value columns. If your tag is unique across the system then choose date,tag, value. If your tag is not unique then choose date, source, tag, value.

Typically, SCADA data is stored in a timestamped data table in either "narrow" or "wide" format.  A narrow format table usually consist of a record for each Tag/Time with the following structure:

NARROW Format table example (date,tag, and Value):

Timestamp Tag Value
1/1/2010 08:15:22 FIT_INF_FLOW 2.75433
1/1/2010 08:15:22 AIT_INF_PH 7.6544
1/1/2010 08:16:22 FIT_INF_FLOW 2.65435
1/1/2010 08:16:22 AIT_INF_PH 7.5555
...

NARROW Format table example (date,source, tag, and Value):

Timestamp Source Tag Value
1/1/2010 08:15:22 BASIN1 AIT_DO 2.75433
1/1/2010 08:15:22 BASIN2 AIT_DO 2.6544
1/1/2010 08:16:22 BASIN1 AIT_DO 2.65435
1/1/2010 08:16:22 BASIN2 AIT_DO 7.5555
...

 

  • Table Name - The name of the database table that you are configuring
  • Table Owner/Schema - The database owner of the table that you are configuring. Typically, for sql, this is 'dbo'.
  • [DATE] Column Name - The name of the column that contains the date/time
  • [TAG] Column Name - The name of the column that contains the tag/variable/identifier
  • [VALUE] Column Name - The name of the column that contains the value/data
  • [SOURCE] Column Name - The name of the column that contains the source. Only available if you chose the Table Format: data, source, tag, value
  • [STATUS] Column Name - The name of the column that contains the Status Value.
  • [BUTTON] Generate Q12160 Tag Browser table in OPSROOT - After you have configured the tables you want the interface to connect to you need to click this button. Clicking the button allows you to generate a table in OPSROOT that the Hach WIMS client uses when you configure your variables. This table will contain a list of the available tags in the tables that you defined.
  • [BUTTON] Test Mappings - This button allows you to test your settings and to see if the interface is able to get data from the table mapping that you defined.

Advanced - Allows you tweak advanced configuration parameters

  • Connection Alive Test Strategy - Allows you to pick what query the interface should run against source when testing whether the connection is still alive.  Prior to every interface import a simple query is executed to verify we are still connected to the source. The default (Test with SELECT TOP ROW Query) behavior is valid for most cases other than when using database views instead of tables. In case of views, you may need to select Test with GET DATE TIME Query

Test with 'SELECT TOP ROW'  Query - Executes a query against the first mapped table depending on the DBMS type:

  • For Oracle:  Select * from Owner.TableName where RowNum <=1
  • For MS SQL: Select Top 1 * from Owner.TableName
  • All others: Select top 1 * from [TableName]

Test with 'GET DATE TIME' Query

  • For Oracle: Select SYSDATE from dual
  • For MS SQL: Select getdate()
  • All others: Select top 1 * from [TableName]

Test with Custom Query - Executes the entered SQL Query statement. 

  • Source Date Settings

Source Dates are in UTC - Check if Dates are stored as UTC.

  • Define Tag Delimiter (Optional)

Tag Delimiter - Define a new delimiter for Table/Source Tags in Browser for Cross Referencing Variables.  The default delimiter is '::'.  If tags contain'::' you can define a different delimiter.  It must be 2 characters, and NOT '@@' as it is already being used.

  • Note: If left blank, '::' is used as the first delimiter as in the past.
  • Status Values to Import (Optional)

Data Type - Data Type of the Status column in the database.

Status Values - Define the Status Values of the records you want to include in the import.

  • Note: If Status Values or the STATUS Column in Table Mappings are not defined, this feature will not be used.

 

Related Articles
No Related Articles Available.

Article Attachments
No Attachments Available.

Related External Links
No Related Links Available.
Help us improve this article...
What did you think of this article?

poor 
1
2
3
4
5
6
7
8
9
10

 excellent
Tell us why you rated the content this way. (optional)
 
Approved Comments...
No user comments available for this article.
Created on 5/12/2009 11:03 AM.
Last Modified on 3/22/2021 11:49 AM.
Last Modified by Steve Fifer.
Article has been viewed 4726 times.
Rated 3 out of 10 based on 5 votes.
Print Article
Email Article