0

Schema (version 24)

Canary exposes 9 tables to query against:

  • aggregates
  • assetinstances
  • assettypes
  • assettypetags
  • currentdata
  • data
  • tagproperties
  • tags
  • views

aggregates

Returns the name and description for each aggregate to be used when requesting processed/aggregated data. Columns include:

  • aggregate_description
  • aggregate_id

assetinstances *

Returns a list of asset instances for a given asset type within a given view. Columns include:

  • asset_instance
  • asset_type
  • view_name

assettypes *

Returns a list of asset types within a given view. Columns include:

  • asset_type
  • view_name

assettypetags *

Returns a list of tags for a given asset type within a given view. Columns include:

  • asset_type
  • tag_name
  • view_name

* These tables are only useful if assets have been defined through the creation of a virtual view in the Canary Views service.

currentdata

Returns the current value, timestamp, quality, and description of the tags specified in the query. Columns include:

  • description
  • quality
  • tag_name
  • time_stamp
  • value

data

Returns raw or processed data within the start and end time provided. If the user requests processed data, an 'aggregate_id' and 'aggregate_interval' must be passed into the query; otherwise, raw data will be returned.

If requesting raw data and no start and end time is provided, data will only be returned from the last hour.

If requesting processed data and no start and end time is provided, data will be returned...

  • from the last hour, if the 'aggregate_interval' < 1 hour.
  • from the last 7 days, if 1 hour <= 'aggregate_interval' < 1 day.
  • from the last 30 days, if the 'aggregate_interval' >= 1 day.

Columns include:

  • aggregate_id
  • aggregate_interval - both actual ('11/21/2022', '1/17/1982 00:00:00') and relative ('day', 'day+5hour', 'd', 'd+5h', 'now-1h') times are supported
  • description
  • quality
  • tag_name
  • time_stamp - both actual ('11/21/2022', '1/17/1982 00:00:00') and relative ('day', 'day+5hour', 'd', 'd+5h', 'now-1h') times are supported
  • value

tagproperties

Returns the property name and value of each tag in the query. Columns include:

  • property_name
  • property_value
  • tag_name

tags

Returns a list of tags along with some default properties. (*Note: If wishing to return tag properties, especially custom properties, it is recommended to query against the tagproperties table.) Columns include:

  • description
  • eng_units
  • high_limit
  • high_scale
  • log_rate
  • low_limit
  • low_scale
  • other_props
  • tag_name

views

Returns a list of views including the default historian view and any virtual views that have been created in the Canary Views service. Columns include:

  • view_name

Reply

null