DataRuleManager
Versions
v1.0.0
Basic Information
Class Name: DataRuleManager
Title: Data Rule Manager
Version: 1.0.0
Author: Drew Shea
Organization: OneStream
Creation Date: 2025-03-02
Default Routine Memory Capacity: 2.0 GB
Tags
Data Monitor, Data Monitoring, Data Analysis
Description
Short Description
The Data Rule Manager to create, read, update, and delete Data Rules.
Long Description
The Data Rule Manager is used to create, read, update, and delete data rules. The data rules are associated with a group, and this group is specified in the constructor. The group is used to organize the data rules and to make it easier to manage them. The Data Rule Manager provides methods to add data rules from Data Rule Syntax (DRS) and OneStream Filter Editor, delete data rules by group and name, retrieve data rules by group and name, and retrieve all data rules for the group.
Use Cases
1. Create and add Data Rules to Data Rule Groups.
Users can create and add data rules to specific data rule groups either through the filter editor or by providing a text-based Data Rule Syntax (DRS). This allows users to define a wide range of data rules to each specific data monitor group. The filter editor is an interactive component that allows users to drag and drop fields and operators to create complex rules visually. These rules can later be used to evaluate data against specific criteria and find all data points where the defined conditions are triggered. The DRS provides a more text-based approach, allowing users to type out rules in a structured format.
2. Group-based Data Rule Management
The group-based data rule management system provides a comprehensive framework for organizing and managing collections of related data rules. Users can perform efficient bulk operations across entire rule groups, including deleting all data rules in a group, retrieve all data rules in a group and add data rules to a group. This system is particularly useful for managing a data rule group allowing users to easily organize, maintain, and execute data rules that are logically related. By grouping data rules we are able to more effectively manage and monitor data across different contexts, such as departments, functions, or monitoring objectives. Users can also delete singular data rules and pull singular rules from data rule groups.
Routine Methods
1. Init (Constructor)
- Method:
__init__-
Type: Constructor
-
Memory Capacity: 2.0 GB
-
Allow In-Memory Execution: Yes
-
Read Only: No
-
Method Limits: N/A
-
Outputs Dynamic Artifacts: No
-
Short Description:
- Initializes the Data Rule Manager.
-
Detailed Description:
- Initializes the Data Rule Manager. This routine is used to create, read, update, and delete data rules. The data rules are associated with a group, and this group is specified in the constructor. The group is used to organize the data rules and to make it easier to manage them.
-
Inputs:
- Required Input
- Data Rule Group: Select the data rule group to scope this instance to.
- Name:
datarule_group - Tooltip:
- Validation Constraints:
- This input may be subject to other validation constraints at runtime.
- Validation Constraints:
- Type: str
- Name:
- Data Rule Group: Select the data rule group to scope this instance to.
- Required Input
-
Artifacts: No artifacts are returned by this method
-
2. Add Datarule From Drs (Method)
- Method:
add_datarule_from_drs-
Type: Method
-
Memory Capacity: 2.0 GB
-
Allow In-Memory Execution: Yes
-
Read Only: No
-
Method Limits: N/A
-
Outputs Dynamic Artifacts: No
-
Short Description:
- Create a data rule from DRS.
-
Detailed Description:
- Create a data rule from data rule syntax as plaintext. This method will take the data rule syntax, create a data rule, compile the data rule, and add it to the data monitor service. The data rule will be associated with the group specified in the constructor.
-
Inputs:
- Required Input
- Data Rule Name: Please write a valid Data Rule name.
- Name:
datarule_name - Tooltip:
- Validation Constraints:
- This input may be subject to other validation constraints at runtime.
- Validation Constraints:
- Type: str
- Name:
- Data Rule Description: Please write a valid Data Rule description.
- Name:
datarule_description - Tooltip:
- Validation Constraints:
- This input may be subject to other validation constraints at runtime.
- Validation Constraints:
- Type: str
- Name:
- Data Rule Syntax: Please write a valid Data Rule Syntax query.
- Name:
drs - Tooltip:
- Validation Constraints:
- This input may be subject to other validation constraints at runtime.
- Validation Constraints:
- Type: str
- Name:
- Data Rule Name: Please write a valid Data Rule name.
- Required Input
-
Artifacts: No artifacts are returned by this method
-
3. Add Dr From Filter Editor (Method)
- Method:
add_dr_from_filter_editor-
Type: Method
-
Memory Capacity: 2.0 GB
-
Allow In-Memory Execution: Yes
-
Read Only: No
-
Method Limits: N/A
-
Outputs Dynamic Artifacts: No
-
Short Description:
- Creates a data rule from a Filter Editor component.
-
Detailed Description:
- Creates a data rule from a Filter Editor. This method will take the filter editor and create a data rule from it.
-
Inputs:
- Required Input
- Data Rule Name: Please write a valid Data Rule name.
- Name:
datarule_name - Tooltip:
- Detail:
- 50 characters or less
- Validation Constraints:
- This input may be subject to other validation constraints at runtime.
- Detail:
- Type: str
- Name:
- Data Rule Description: Please write a valid Data Rule description.
- Name:
datarule_description - Tooltip:
- Detail:
- 200 characters or less
- Validation Constraints:
- This input may be subject to other validation constraints at runtime.
- Detail:
- Type: str
- Name:
- Data Rule Filter Editor: Select the Data Rule Filter Editor type.
- Name:
datarule_filter_editor - Tooltip:
- Validation Constraints:
- This input may be subject to other validation constraints at runtime.
- Validation Constraints:
- Type: Must be one of the following
- Single Data Monitor Filter
- Required Input
- Data Rule Filter Type: This is a single data monitor filter editor.
- Name:
datarule_filter_type - Tooltip:
- Validation Constraints:
- This input may be subject to other validation constraints at runtime.
- Validation Constraints:
- Type: str
- Name:
- Data Monitor Name: Please provide the name of the datamonitor to filter.
- Name:
datamonitor_name - Tooltip:
- Validation Constraints:
- This input may be subject to other validation constraints at runtime.
- Validation Constraints:
- Type: str
- Name:
- Data Rule Filter Editor: Please write a valid Data Rule Filter Editor.
- Name:
filter_editor - Tooltip:
- Validation Constraints:
- This input may be subject to other validation constraints at runtime.
- Validation Constraints:
- Type: FilterEditorInputParam
- Name:
- Flag Level: Please select a flag level to evaluate.
- Name:
flag_level - Tooltip:
- Validation Constraints:
- This input may be subject to other validation constraints at runtime.
- Validation Constraints:
- Type: FlagLevel_
- Name:
- Data Rule Filter Type: This is a single data monitor filter editor.
- Required Input
- Multi Data Monitor Filter
- Required Input
- Data Rule Filter Type: This is a multi data monitor filter editor.
- Name:
datarule_filter_type - Tooltip:
- Validation Constraints:
- This input may be subject to other validation constraints at runtime.
- Validation Constraints:
- Type: str
- Name:
- Data Rule Filter Editor: Please write a valid Data Rule Filter Editor.
- Name:
filter_editor - Tooltip:
- Validation Constraints:
- This input may be subject to other validation constraints at runtime.
- Validation Constraints:
- Type: FilterEditorInputParam
- Name:
- Flag Level: Please select a flag level to evaluate.
- Name:
flag_level - Tooltip:
- Validation Constraints:
- This input may be subject to other validation constraints at runtime.
- Validation Constraints:
- Type: FlagLevel_
- Name:
- Data Rule Filter Type: This is a multi data monitor filter editor.
- Required Input
- Single Data Monitor Filter
- Name:
- Data Rule Name: Please write a valid Data Rule name.
- Required Input
-
Artifacts: No artifacts are returned by this method
-
4. Delete By Datamonitors (Method)
- Method:
delete_by_datamonitors-
Type: Method
-
Memory Capacity: 2.0 GB
-
Allow In-Memory Execution: Yes
-
Read Only: No
-
Method Limits: N/A
-
Outputs Dynamic Artifacts: No
-
Short Description:
- Deletes all the data rules for the group and the data monitor references.
-
Detailed Description:
- Deletes any data rules that are a part of the group specified in the constructor and has a reference to the data monitor references. If a data rule has a reference to multiple data monitors and any of them are specified in the parameters then it will be deleted.
-
Inputs:
- Required Input
- Data Monitors to Delete: Select Data Monitor Names.
- Name:
datamonitor_ids - Tooltip:
- Validation Constraints:
- This input may be subject to other validation constraints at runtime.
- Validation Constraints:
- Type: list[str]
- Name:
- Data Monitors to Delete: Select Data Monitor Names.
- Required Input
-
Artifacts: No artifacts are returned by this method
-
5. Delete Datarule (Method)
- Method:
delete_datarule-
Type: Method
-
Memory Capacity: 2.0 GB
-
Allow In-Memory Execution: Yes
-
Read Only: No
-
Method Limits: N/A
-
Outputs Dynamic Artifacts: No
-
Short Description:
- Deletes a data rule by group and name.
-
Detailed Description:
- Deletes a single data rule (if it exists) by group and name. This method will delete the data rule that is associated with the group and data rule name specified in the parameters. Note that this does not delete the data rule evaluations that were generated by running the data rule.
-
Inputs:
- Required Input
- Data Rule: Select the Data Rule name.
- Name:
datarule_name - Tooltip:
- Validation Constraints:
- This input may be subject to other validation constraints at runtime.
- Validation Constraints:
- Type: str
- Name:
- Data Rule: Select the Data Rule name.
- Required Input
-
Artifacts: No artifacts are returned by this method
-
6. Delete Datarules By Group (Method)
- Method:
delete_datarules_by_group-
Type: Method
-
Memory Capacity: 2.0 GB
-
Allow In-Memory Execution: Yes
-
Read Only: No
-
Method Limits: N/A
-
Outputs Dynamic Artifacts: No
-
Short Description:
- Deletes all the data rules for the group specified in the constructor.
-
Detailed Description:
- Deletes all the data rules for the group specified in the constructor. Note that this does not delete the data rule evaluations that were generated by running these data rules.
-
Inputs:
- No input parameters
-
Artifacts: No artifacts are returned by this method
-
7. Get Datarule (Method)
- Method:
get_datarule-
Type: Method
-
Memory Capacity: 2.0 GB
-
Allow In-Memory Execution: Yes
-
Read Only: No
-
Method Limits: N/A
-
Outputs Dynamic Artifacts: No
-
Short Description:
- Retrieves a data rule by group and name.
-
Detailed Description:
- Retrieves a data rule by group and name. This method will retrieve the compiled data rule that is associated with the group and data rule name specified in the parameters.
-
Inputs:
- Required Input
- Data Rule: Select the Data Rule name.
- Name:
datarule_name - Tooltip:
- Validation Constraints:
- This input may be subject to other validation constraints at runtime.
- Validation Constraints:
- Type: str
- Name:
- Data Rule: Select the Data Rule name.
- Required Input
-
Artifacts:
- Data Rule: The Data Rule and it's related metadata.
- Qualified Key Annotation:
response - Aggregate Artifact:
False - In-Memory Json Accessible:
True - File Annotations:
artifacts_/@response/data_/data.json- Stored json data.
artifacts_/@response/data_/schema.json- The json schema of the json object stored in the 'data.json' file
- Qualified Key Annotation:
- Data Rule: The Data Rule and it's related metadata.
-
8. Get Datarules By Group (Method)
- Method:
get_datarules_by_group-
Type: Method
-
Memory Capacity: 2.0 GB
-
Allow In-Memory Execution: Yes
-
Read Only: No
-
Method Limits: N/A
-
Outputs Dynamic Artifacts: No
-
Short Description:
- Retrieve all data rules for the group specified in the constructor.
-
Detailed Description:
- This method will retrieve all the compiled data rules that are associated with the group specified in the constructor.
-
Inputs:
- No input parameters
-
Artifacts:
- Data Rules: Contains the list of data rules associated with the group.
- Qualified Key Annotation:
response - Aggregate Artifact:
False - In-Memory Json Accessible:
True - File Annotations:
artifacts_/@response/data_/data.json- Stored json data.
artifacts_/@response/data_/schema.json- The json schema of the json object stored in the 'data.json' file
- Qualified Key Annotation:
- Data Rules: Contains the list of data rules associated with the group.
-
Interface Definitions
No interface definitions found for this routine
Developer Docs
Routine Typename: DataRuleManager
| Method Name | Artifact Keys |
|---|---|
__init__ | N/A |
add_datarule_from_drs | N/A |
add_dr_from_filter_editor | N/A |
delete_by_datamonitors | N/A |
delete_datarule | N/A |
delete_datarules_by_group | N/A |
get_datarule | response |
get_datarules_by_group | response |