Selectors¶
All clair commands accept --select to filter which Trouves to act on. This lets you run, compile, test, or inspect a subset of your project.
Syntax¶
--select takes a glob pattern matched against the Trouve's fully-qualified name (database.schema.table). The * wildcard matches within one segment.
Examples¶
Entire schema:
Single Trouve:
Name pattern across all databases and schemas:
Exact database, any schema, name pattern:
Unioning multiple selectors¶
Repeat --select to union multiple patterns. Trouves matching any pattern are included:
No matches¶
If no Trouves match the selector, clair exits cleanly:
Selectors and tests¶
clair test --select includes SOURCE Trouves in the filter for convenience, but the test runner skips them internally (SOURCEs don't have tests).
Which commands support --select¶
| Command | Supports --select |
|---|---|
clair run | Yes |
clair compile | Yes |
clair test | Yes |
clair dag | Yes |
clair init | No |
clair docs | No |
clair clean | No |