SqlRuleFilter Class

Represents a filter which is a composition of an expression and an action that is executed in the pub/sub pipeline.

Inheritance
builtins.object
SqlRuleFilter

Constructor

SqlRuleFilter(sql_expression: str | None = None, parameters: Dict[str, str | int | float | bool | datetime | timedelta] | None = None)

Parameters

Name Description
sql_expression
str

The SQL expression. e.g. MyProperty='ABC'

Default value: None
parameters
Dict[str, Union[str, int, float, bool, datetime, <xref:timedelta>]]

Sets the value of the sql expression parameters if any.

Default value: None

Examples

Create SqlRuleFilter.


   sql_filter = SqlRuleFilter("property1 = 'value'")
   sql_filter_parametrized = SqlRuleFilter(
       "property1 = @param1 AND property2 = @param2",
       parameters={
           "@param1": "value",
           "@param2" : 1
       }
   )