superset_rls_update
Update an existing RLS rule in Apache Superset by changing its name, filter type, clause, roles, or tables. Provide both roles and tables together to prevent unintentional clearing.
Instructions
Update an RLS rule.
CRITICAL: Superset PUT API REPLACES the roles and tables fields entirely. If you pass only roles without tables, Superset will WIPE tables with an empty list (and vice versa). Therefore, this tool REQUIRES passing roles and tables simultaneously if either one is specified.
For safe updates:
First get the current rule via rls_list
Pass BOTH roles AND tables (even if you only change one)
Args: rls_id: ID of the RLS rule to update. name: New name. filter_type: New type: "Regular" or "Base". clause: New SQL WHERE condition (without the WHERE keyword). tables: List of dataset IDs (REPLACES all current). REQUIRED if roles is specified. roles: List of role IDs (REPLACES all current). REQUIRED if tables is specified. group_key: New grouping key. description: New description.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | ||
| roles | No | ||
| clause | No | ||
| rls_id | Yes | ||
| tables | No | ||
| group_key | No | ||
| description | No | ||
| filter_type | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |