Examples
This topic describes the examples of planning engine queries.
- Query to filter Products resources for a specific attribute value:
The result of this query is the resources fromOperation Field Comparison Value Description ADD Products.Item Type = IP Add resources to the query results, from class Products
, which have value IP for attributeItem type
.Products
class for which the value ofItem type
attribute is IP. - Query to filter Products At Locations resources from which a specific property value
exists in the first bucket:
The result of this query is the resources fromOperation Field Comparison Value Description LIMIT bucket.start = $bucket_start[0] Filter buckets with a start date of the first bucket in the calendar. ADD Products At Locations.qty on hand = %nil Add resources to the results, from the Products At Locations
class, which contain empty value forqty on hand
property in the filtered buckets above.Products At Locations
class, where theqty on hand
property is nil for the first bucket. - Query for Customer Allocations resources which contain a property value between two
values:
The result of this query is the resources fromOperation Field Comparison Value Description ADD Customer Allocations.external demand > 0 Adds resources to the results, from Customer Allocations class which contain a value greater than 0 for the external demand property for any bucket. LIMIT Customer Allocations.external demand < 0.01 Filter resources in the results above, which contain a value for external demand
property less than 0.01 for any bucket.customer Allocation
class, where theexternal demand
property is between 0 and 0.01, for any bucket in the planning horizon. - Query to filter Products At Locations resources which contain either of two properties
with specific values:
The result of this query is the resources fromOperation Field Comparison Value Description ADD Products At Locations.qty on hand = %nil Add resources to the results, from Products At Locations
class, which contain an empty value forqty on hand
property for any bucket.ADD Products At Locations.qty on hand wip = %nil Add resources to the results, from Products At Locations
class, which contain an empty value forqty on hand wip
property for any bucket.Products At Locations
whereqty on hand
property is nil, ORqty on hand wip
property is nil.