Row-filter expression syntax for catalog search
Row-filter expressions in awc_udf policies compare asset fields, such as type, classification, owner, and glossary term, to values, and limit the assets that users find in catalog search.
Comparisons
A comparison has the form field
operator 'value'. The following
operators are supported:
=for equals<,<=,>, and>=for number rangesLIKEfor a case-insensitive pattern match, where%matches any characters
Quote text values with single or double quotation marks. Numbers can be unquoted.
Combine comparisons with AND, OR, and parentheses.
AND is evaluated before OR. The
NOT and != operators are not supported. To
exclude assets, use .has_not(...).
Fields
| Field | Matches |
|---|---|
type or entityType |
The asset type, such as hive:table. |
domain, classification,
owner, glossaryTerm |
A name in the domain, classification, owner, or glossary term list of the asset. |
_.attribute or
attributes.attribute |
An attribute of the asset, such as
_.tableType. |
urn, parentUrn,
name, createdBy,
createdAt |
The search field of the same name. |
List conditions
To match entries in the owner, classification, or glossary term lists of an asset,
use .has(...) or .has_not(...):
owners.has(owner = 'jane.doe@example.com')matches assets with that owner.classifications.has(name = 'pii')matches assets with thepiiclassification.terms.has(name = 'customeraccount')matches assets with the glossary term.classifications.has_not(name = 'pii')matches assets without thepiiclassification.
Inside .has(...), use only AND. To match either of
two classifications, write two conditions joined by OR, for example,
classifications.has(name = 'a') OR classifications.has(name =
'b').
Examples
| Expression | Users find |
|---|---|
type = 'hive:table' OR type = 'hive:schema_field' |
Only Hive tables and columns |
classifications.has_not(name = 'pii') |
All assets except those classified as
pii |
classifications.has(name = 'sensitive') |
Sensitive assets |
domain LIKE '%finance%' |
Assets in any domain whose name contains finance |
Common mistakes
- A missing operator, such as
classification:pii. Writeclassification = 'pii'. - An unquoted text value, such as
type = abc. Writetype = 'abc'.
