
Pass ids of all objects and selected objects (attributes, metrics and elements) and the generate the requested objects and view filter body for the pull Data API.
attributes
List of ids of all attribute objects of given cube/report.
metrics
List of ids of all metrics objects of given cube/report.
attr_elements
(optional) List of ids of all attribute elements of given cube/report.
selected_attributes
List of ids for selected attributes.
selected_metrics
List of ids for selected metrics.
selected_attr_elements
List of ids for selected attribute elements.
operator
(character, optional): Supported view filter operators are either "In" or "NotIn". This defines whether data will include ("In") or exclude ("NotIn") the supplied attr_elements values.
new()
Initialize a filter instance
Filter$new(attributes, metrics, attr_elements = NULL)
attributes
(list): List of all attributes IDs in the cube/report
metrics
(list): List of all metrics IDs in the cube/report
attr_elements
(list, optional): List of all attributes elements IDs in the cube/report. If not #' provided the attribute element object will not be validated on selection
select()
Select attribute/metric/attr_element objects to filter data. Selecting empty lists or vectors is supported and means that all objects (attributes/metrics) are deselected. This method eliminates duplicates and provides type validation for attributes/metrics and optionally attribute elements (if attr_elements are fetched before)
Filter$select(object_id, object_type = "automatic")
object_id
(list or character vector) Object IDs to be selected. Provide empty list if the objects of the chosen type are to be deselected. nshould be selected
object_type
(character or NULL, optional) either 'attribute_elements', 'automatic'
select_attr_elements()
Filter$select_attr_elements(attribute_elements)
clear()
Filter$clear(object = "all")
filter_body()
Filter$filter_body()
clone()
The objects of this class are cloneable with this method.
Filter$clone(deep = FALSE)
deep
Whether to make a deep clone.