Element schema
- Last UpdatedNov 10, 2023
- 3 minute read
Table templates and table-valued function templates from the element schema are covered in this topic. Each section describes the template parameters and the structure of the template specializations.
Master.Element.Value
Its specializations are tables that contain current values of selected element attributes.
Template parameters
|
Name |
Data type |
|---|---|
|
Template |
String |
|
AttributeMetaData |
Array of tuple parameters |
AttributeMetaData sub-parameters
|
Name |
Data type |
Is nullable? |
Null behavior |
Is optional? |
|---|---|---|---|---|
|
AttributeTemplatePath |
String |
No |
N/A |
No |
|
TimeStampColumnName |
String |
Yes |
Column is excluded |
No |
|
ValueColumnName |
String |
No |
N/A |
No |
|
UnitOfMeasureColumnName |
String |
Yes |
Column is excluded |
Yes |
|
ErrorColumnName |
String |
Yes |
Column is excluded |
Yes |
|
UnitOfMeasure |
String |
Yes |
Default UOM |
Yes |
Columns
|
Name |
Data type |
Is nullable? |
Primary key |
|---|---|---|---|
|
ElementID |
Guid |
No |
Yes |
|
<TimeStampColumnName> |
DateTime |
No |
No |
|
<ValueColumnName> |
Yes |
No |
|
|
<UnitOfMeasureColumnName> |
String |
Yes |
No |
|
<ErrorColumnName> |
String |
Yes |
No |
Master.Element.GetSampledValue
Its specializations are table-valued functions that return sampled values at the specified time.
Template parameters
|
Name |
Data type |
|---|---|
|
Template |
String |
|
AttributeMetaData |
Array of tuple parameters |
AttributeMetaData sub-parameters
|
Name |
Data type |
Is nullable? |
Null behavior |
Is optional? |
|---|---|---|---|---|
|
AttributeTemplatePath |
String |
No |
N/A |
No |
|
ValueColumnName |
String |
No |
N/A |
No |
|
UnitOfMeasureColumnName |
String |
Yes |
Column is excluded |
Yes |
|
ErrorColumnName |
String |
Yes |
Column is excluded |
Yes |
|
UnitOfMeasure |
String |
Yes |
Default UOM |
Yes |
Parameters
|
Name |
Data type |
|---|---|
|
ElementID |
Guid |
|
Time |
DateTime |
Columns
|
Name |
Data type |
Is nullable? |
Primary key |
|---|---|---|---|
|
<ValueColumnName> |
Yes |
No |
|
|
<UnitOfMeasureColumnName> |
String |
Yes |
No |
|
<ErrorColumnName> |
String |
Yes |
No |
Master.Element.GetSampledValues
Its specializations are table-valued functions that return several sampled values within the specified time range.
Template parameters
|
Name |
Data type |
|---|---|
|
Template |
String |
|
AttributeMetaData |
Array of tuple parameters |
AttributeMetaData sub-parameters
|
Name |
Data type |
Is nullable? |
Null behavior |
Is optional? |
|---|---|---|---|---|
|
AttributeTemplatePath |
String |
No |
N/A |
No |
|
ValueColumnName |
String |
No |
N/A |
No |
|
UnitOfMeasureColumnName |
String |
Yes |
Column is excluded |
Yes |
|
ErrorColumnName |
String |
Yes |
Column is excluded |
Yes |
|
UnitOfMeasure |
String |
Yes |
Default UOM |
Yes |
Parameters
|
Name |
Data type |
|---|---|
|
ElementID |
Guid |
|
StartTime |
DateTime |
|
EndTime |
DateTime |
|
TimeStep |
TimePeriod |
Columns
|
Name |
Data type |
Is nullable? |
Primary key |
|---|---|---|---|
|
TimeStamp |
DateTime |
No |
Yes |
|
<ValueColumnName> |
Yes |
No |
|
|
<UnitOfMeasureColumnName> |
String |
Yes |
No |
|
<ErrorColumnName> |
String |
Yes |
No |
Master.Element.GetSummaries
Its specializations are table-valued functions that return several summaries over a time range for each interval within the range. For more information, see the AF SDK Reference page AFData.Summaries Method.
Template parameters
|
Name |
Data type |
|---|---|
|
Template |
String |
|
AttributeMetaData |
Array of tuple parameters |
AttributeMetaData sub-parameters
|
Name |
Data type |
Is nullable? |
Null behavior |
Is optional? |
|---|---|---|---|---|
|
AttributeTemplatePath |
String |
No |
N/A |
No |
|
SummaryType |
String |
No |
N/A |
No |
|
CalculationBasis |
String |
No |
N/A |
No |
|
ValueColumnName |
String |
No |
N/A |
No |
|
UnitOfMeasureColumnName |
String |
Yes |
Column is excluded |
Yes |
|
ErrorColumnName |
String |
Yes |
Column is excluded |
Yes |
|
UnitOfMeasure |
String |
Yes |
Default UOM |
Yes |
|
ValueTimeStampColumnName |
String |
Yes |
Column is excluded |
Yes |
For allowed values of the template arguments, see the following AF SDK Reference pages:
-
SummaryType: AFSummaryTypes Enumeration
-
CalculationBasis: AFCalculationBasis Enumeration
Parameters
Name
Data type
ElementID
Guid
StartTime
DateTime
EndTime
DateTime
TimeStep
TimePeriod
TimeType
String
Note: The following values are allowed for the TimeType argument:
1 - EarliestTime - The timestamp returned will be for the start of the summary period.
2 - MostRecentTime - The timestamp returned will be for the end of the summary period.
For more information about the TimeType argument in general, see the AF SDK Reference page TimeType: AFTimestampCalculation Enumeration.
Columns
Name
Data type
Is nullable?
Primary key
TimeStamp
DateTime
No
Yes
<ValueColumnName>
Double
Yes
No
<UnitOfMeasureColumnName>
String
Yes
No
<ErrorColumnName>
String
Yes
No
Master.Element.GetSummary
Its specializations are table-valued functions that return summaries over a single time range. For more information, see the AF SDK Reference page AFData.Summary Method.
Template parameters
|
Name |
Data type |
|---|---|
|
Template |
String |
|
AttributeMetaData |
Array of tuple parameters |
AttributeMetaData sub-parameters
|
Name |
Data type |
Is nullable? |
Null behavior |
Is optional? |
|---|---|---|---|---|
|
AttributeTemplatePath |
String |
No |
N/A |
No |
|
SummaryType |
String |
No |
N/A |
No |
|
CalculationBasis |
String |
No |
N/A |
No |
|
ValueColumnName |
String |
No |
N/A |
No |
|
UnitOfMeasureColumnName |
String |
Yes |
Column is excluded |
Yes |
|
ErrorColumnName |
String |
Yes |
Column is excluded |
Yes |
|
UnitOfMeasure |
String |
Yes |
Default UOM |
Yes |
|
ValueTimeStampColumnName |
String |
Yes |
Column is excluded |
Yes |
For allowed values of the template arguments, see the following AF SDK Reference pages:
-
SummaryType: AFSummaryTypes Enumeration
-
CalculationBasis: AFCalculationBasis Enumeration
Parameters
Name
Data type
ElementID
Guid
StartTime
DateTime
EndTime
DateTime
Columns
Name
Data type
Is nullable?
Primary key
<ValueColumnName>
Double
Yes
No
<UnitOfMeasureColumnName>
String
Yes
No
<ErrorColumnName>
String
Yes
No