SHOW QUERY POLICIES

View as Markdown
PREVIEW This feature is in private preview. It is under active development and may have stability or performance issues. It isn't subject to our backwards compatibility guarantees.
To enable this feature for your environment, contact our team.

SHOW QUERY POLICIES lists the query policies in Materialize.

Syntax

SHOW QUERY POLICIES [ LIKE <pattern> | WHERE <condition expression> ];
Syntax element Description
LIKE <pattern> If specified, only show query policies whose name matches the pattern.
WHERE <condition expression> If specified, only show query policies that match the condition expression.

Examples

SHOW QUERY POLICIES;
        name        |  mode   |                  rules                  | comment
--------------------+---------+-----------------------------------------+---------
 indexed_reads_only | enforce | no_storage_reads,no_temporary_dataflows |

To see the rules in each policy and the clusters each policy is attached to, query mz_internal.mz_query_policy_rules and mz_internal.mz_query_policy_attachments:

SELECT p.name AS policy, c.name AS cluster
FROM mz_internal.mz_query_policy_attachments a
JOIN mz_internal.mz_query_policies p ON p.id = a.policy_id
JOIN mz_catalog.mz_clusters c ON c.id = a.object_id;
Back to top ↑