PostgreSQL

Description

The unit executes SQL-query on server and puts the result to data items. The unit has two modes: scalar and table. In scalar mode the unit expects one scalar value in the result. In table mode the unit expects a table with two or three columns:
  • Name
  • Value
  • UOM (optional)
  • The names of the columns are not important. The third column may not exist. For example:
    select 'nameOfItem', 42.42, 'uom'
    returns one record. The unit puts 42.42 to the data item 'nameOfItem' with the unit of measure 'uom'.

    Parameters

    Address
    Address of the server.
    User
    User's name.
    Password
    The password of the user.
    Database
    The name of the database.
    Query
    SQL-query
    As table
    Switches on the table mode. Using scalar mode when the checkbox is unchecked.
    Period
    The period between sensor activities

    Data Items

    In scalar mode the unit puts value to the data item 'Result'. In table mode the unit gets the names of the items from the returned rows.