Skip to main content

Overview

The Formal SQL parser tags every column reference with the list of functions it passes through (column.in_functions in policy input). Each function carries one or more categories sourced from the catalogues below, so policies can branch on category instead of name. The catalogue is split per dialect: a single Common file holds names shared across every supported dialect with the same meaning, and each technology has its own file for entries that are dialect-specific or have a different interpretation in that dialect. There are 845 entries across all dialects.

How policies use this

Read the categories off column.in_functions[].categories in Rego. For example, aggregates are a common way to slip past row limits and rate limits by packing many rows into one cell. Hashing aggregated columns closes that gap:

Categories

Each function is tagged with one or more categories, organized in two groups.

Shape categories

Describes how the function participates in SQL evaluation. Every catalogued function carries at least one shape category.

Domain categories

Describes the kind of data the function operates on or returns. A function can have zero, one, or several domain categories.

Catalogue

For canonical upstream documentation see Snowflake, PostgreSQL / Redshift, and MySQL / MariaDB. Use the search box to find a function by name, and click category pills to narrow the list to entries that carry the selected categories.