Historians: Read Asset Metadata
This article provides starter solutions for obtaining asset metadata from AVEVA PI System.
What this article covers
Often Intelligence Hub data pipeline solutions focus on high‑frequency value changes for large numbers of points, written to a narrow table for high throughput and low latency. Those pipelines typically do not process asset metadata. A parallel metadata pipeline might be used to provide downstream systems with asset information such as asset name, description, hierarchy path, and more. This article provides starter solutions for processing asset metadata.
Intelligence Hub design considerations for obtaining asset metadata
These considerations pertain to processing asset metadata.
- Define scope: Identify the assets that are in scope for the given solution.
- Plan how you will query: Decide how assets (and their attributes) will be queried (e.g., naming conventions, templates, filters).
- Start small, measure, then scale: Begin by querying for metadata for 10s or 100s of assets and scale from there to optimize query duration. Optimally, the duration of the query should be approximately a few seconds.
- Scale resources as needed: Determine if resources need to be scaled because it might not be possible to obtain all desired metadata with one query.
- Assess Connection impact: Understand how the new Connection Input impacts other Inputs sharing the same Connection.
- Account for change cadence: Determine how often asset metadata changes and configure an appropriate Pipeline polling frequency so updates are reflected efficiently.
- Choose a pattern: Run on a schedule, poll at a frequency, or invoke the pipeline externally. Asset metadata typically changes infrequently, so processing can be less frequent than value changes.
- Changes to asset metadata: This solution may update existing records in the destination system rather than inserting new records.
- Select outputs: Write the payload to a database, data lake, or data warehouse, or make it available via the Intelligence Hub's REST Data Server.
- Model the shape: This solution type is conducive to a wide table format with columns per metadata value. Use an Intelligence Hub Model to define column names and data types.
AVEVA PI System Asset Framework (AF): asset metadata
These considerations pertain to obtaining metadata for assets and attributes from PI System Asset Framework.
- Assume that the metadata and the values will be linked via an identifier. In the starter solutions, the unique keys in the Model are the attribute ID and asset ID.
- It is typically best to use the Intelligence Hub PI Connection Asset Metadata Input that returns attribute configuration per asset.
- The Asset Metadata Connection Input queries the PI Asset Framework's database and can be a long-duration query if there are many assets returned by the query. It may be necessary to index through an asset list to avoid long-duration queries. The Query Paging option can be used to accomplish this as provided in the example below.
- The starter solution obtains asset attribute metadata from the PI System Asset Framework. The attribute metadata includes the static value for asset attributes that are not associated with PI Points. In the starter solution, the values are ignored. Alternatively, these values could be obtained written to the destination system to the table containing asset metadata or another table.
A project file may be downloaded [here].
Navigate to the interactive demonstration [here].
AVEVA PI System Asset Framework (AF): large number of assets
AVEVA PI System Asset Framework can be used to configure assets and asset hierarchies. Sometimes there are thousands of assets configured in Asset Framework. Therefore, it is not possible to create a data pipeline solution that processes data for all assets in one pass. The following is an example solution that obtains metadata for thousands of assets and published the data to a MQTT broker. The solution uses the Intelligence Hub Query Paging capability that is available on some AVEVA PI Connection Inputs.
The Asset Metadata Connection Input queries the PI Asset Framework's database and can be a long-duration query if there are many assets returned by the query. It may be necessary to index through an asset list to avoid long-duration queries. The Query Paging option can be used to accomplish this. Iterate to optimize the page size. Optimally the query should return data in a few seconds or less. The page index is passed to the Connection Input from a Pipeline.
An example project file may be downloaded [here].
Navigate to the interactive demonstration [here].
Summary
Use these considerations to implement asset metadata pipelines alongside value change pipelines in Intelligence Hub. Align scope, query strategy, cadence, modeling, and destination behavior with downstream requirements.
Additional Resources