Skip to content

can't create rule action of type sql #20

@huguesv

Description

@huguesv

There are 2 types of action for service bus subscription rule: empty and sql

I have not been able to get sql action to work.

In .NET, the action types are named 'EmptyRuleAction' and 'SqlRuleAction'. If you create one from .NET and query it back in Python, that's what you will see.

In Python, it appears that the action types are 'EmptyRuleAction' and 'SqlFilterAction'. However, 'SqlFilterAction' doesn't work. I have also tried 'SqlRuleAction' and that doesn't work either (changing the code in convert_rule_to_xml to use 'SqlRuleAction' instead).

Here's a code snippet, this generates a 'bad request' error:

rule1 = Rule()
rule1.action_type = 'SqlFilterAction'
rule1.action_expression = "set foo='low'"
created = self.sbs.create_rule(self.topic_name, 'MySubscription', 'MyRule1', rule1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions