GetRtEntitiesByType@1
Node GetRtEntitiesByType@1
is used to extract runtime entities by type from the OctoMesh Asset Repository.
Adapter Prerequisites
Node Configuration
For fields path
, targetPath
, targetValueWriteMode
, and targetValueKind
, see Overview.
transformations:
- type: GetRtEntitiesByType@1
ckTypeId: Industry.Energy/Photovoltaic.Module # Type of the runtime entities
skip: 0 # Number of entities to skip
take: 10 # Number of entities to extract
fieldFilters: # Field filters to apply, multiple filters can be applied using the AND operator
- attributePath: manufacturer # attribute path to filter
operator: Equals # Value to filter
comparisonValue: "SunPower" # Comparison value (when using a direct value)
comparisonValuePath: $.manufacturer # Path to the comparison value in the payload (when using a path)
sortOrders: # Sort orders to apply to the results
- attributePath: manufacturer # attribute path to sort by
sortOrder: Ascending # Sort direction: Ascending or Descending
- attributePath: model
sortOrder: Descending
Operators
The following operators are available for filtering:
Operator | Description | Sample |
---|---|---|
Equals | Filters entities where the field value is equal to the comparison value. | "comparisonValue": "SampleValue" |
NotEquals | Filters entities where the field value is not equal to the comparison value. | "comparisonValue": "SampleValue" |
LessThan | Filters entities where the field value is less than the comparison value. | "comparisonValue": 10 |
LessEqualsThan | Filters entities where the field value is less than or equal to the comparison value. | "comparisonValue": 10 |
GreaterThan | Filters entities where the field value is greater than the comparison value. | "comparisonValue": 10 |
GreaterEqualsThan | Filters entities where the field value is greater than or equal to the comparison value. | "comparisonValue": 10 |
In | Filters entities where the field value is in the comparison value. | "comparisonValue": ["SampleValue1", "SampleValue2"] |
NotIn | Filters entities where the field value is not in the comparison value. | "comparisonValue": ["SampleValue1", "SampleValue2"] |
Like | Filters entities where the field value is like the comparison value. | "comparisonValue": "SampleValue" |
MatchRegEx | Filters entities where the field value matches the regular expression. | "comparisonValue": "SampleValue.*" |
AnyEquals | Filters entities where any of the field values of an array is equal to the comparison value. | "comparisonValue": "SampleValue" |
Match | Matches documents that contain an array field with at least one element that matches all the specified query criteria. | "comparisonValue": [ { "attributeName": "sample", "operator": EQUALS, "comparisonValue": "demo"} ] |
Sort Orders
The sortOrders
parameter allows you to specify how the retrieved entities should be sorted. Multiple sort criteria can be applied, with the first sort order having the highest priority.
Sort Order Configuration
Parameter | Type | Required | Description |
---|---|---|---|
attributePath | string | Yes | Path to the attribute to sort by |
sortOrder | enum | Yes | Sort direction: Ascending or Descending |
Sort Direction Options
Sort Order | Description |
---|---|
Ascending | Sort from lowest to highest (A-Z, 0-9, oldest to newest) |
Descending | Sort from highest to lowest (Z-A, 9-0, newest to oldest) |
Example Usage
sortOrders:
- attributePath: manufacturer # Primary sort: by manufacturer (ascending)
sortOrder: Ascending
- attributePath: model # Secondary sort: by model (descending)
sortOrder: Descending
- attributePath: installationDate # Tertiary sort: by installation date (newest first)
sortOrder: Descending
Sort Behavior
- Multiple Sort Criteria: When multiple sort orders are specified, they are applied in the order they appear in the configuration
- Data Types: Sorting works with various data types including strings, numbers, dates, and booleans
- Null Values: Null values are typically sorted to the beginning (ascending) or end (descending) of the result set
- Case Sensitivity: String sorting is case-insensitive by default
- Performance: Adding sort orders may impact query performance, especially on large datasets
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
ckTypeId | string | No* | Static type identifier of the entities to retrieve |
ckTypeIdPath | string | No* | JSONPath to the type identifier in the data context |
skip | integer | No | Number of entities to skip (for pagination) |
take | integer | No | Maximum number of entities to retrieve |
fieldFilters | array of FieldFilterWithPathDto | No | Filters to apply when querying entities |
sortOrders | array of SortOrderDto | No | Sort criteria to apply to the result set |
*Either ckTypeId
or ckTypeIdPath
must be specified.
Use Cases
- Entity Listing: Retrieve entities of a specific type for display or processing
- Filtered Queries: Get entities that match specific criteria using field filters
- Sorted Results: Retrieve entities in a specific order for reporting or display
- Pagination: Implement pagination using skip and take parameters
- Data Processing: Extract entities for further transformation or analysis
- Reporting: Generate sorted and filtered reports based on entity data