Skip to main content
Version: 8.3

system.historian.types.metadataPoint

New in 8.3.5

This function is used in Python Scripting.

Description​

Creates a metadata point that can be stored to a historian. Metadata points allow you to store additional properties associated with a historical path at a specific point in time.

The returned object is used with system.historian.storeMetadata.

Client Permission Restrictions​

This scripting function has no Client Permission restrictions.

Syntax​

system.historian.types.metadataPoint(source, properties, timestamp)

Parameters​

TypeParameterDescription
StringsourceThe historical path where the metadata point will be stored.
DictionarypropertiesA dictionary of properties to be stored as historical metadata.
DatetimestampThe timestamp when the metadata point was recorded.

Returns​

MetadataPoint - A metadata point object that can be passed to system.historian.storeMetadata.

Scope​

Gateway, Vision Client, Perspective Session

Code Examples​

Create and Store Metadata
# Create a metadata point and store it using the historian API.

source = "histprov:default:/tag:MyTag"

properties = {
"batchId": "A123",
"operator": "jsmith"
}

timestamp = system.date.now()

metadata = system.historian.types.metadataPoint(
source,
properties,
timestamp
)

system.historian.storeMetadata([metadata])