Namespace yaml

The yaml module contains the main configuration language for Spyglass.

The primary interface Yaml is the object that is serialized and deserialized to yaml files, forming the basis of this library's config-as-code implementation.

Basic Example

A simple example of a yaml file looks like:

roleGrants:
acme_prod_all_tables_viewer:
select:
table:
- acme.prod.<FUTURE>
view:
- acme.prod.<FUTURE>
- acme.prod.call_center
- acme.prod.catalog_page
- acme.prod.catalog_returns
- acme.prod.catalog_sales
usage:
database:
- acme
schema:
- acme.prod
spyglass:
accountId: account-123
lastSyncedMs: 1678883775793
platform: snowflake
version: 1
userGrants:
charles_stevens:
roles:
- acme_prod_all_tables_viewer

Special Operators

As seen above, you can use database.schema.<FUTURE> to create a "future grants" statement, such as acme.prod.<FUTURE> to grant access to all future views.

Additionally, you can use database.schema.* to create an "all grants" statement, such as acme.prod.* to grant access to all current views.

Goals

One main design goal of this yaml is to be isomorphic; that is, a reversible mapping between Spyglass configuration and databases like Snowflake.

So, you can import Snowflake access rules to Spyglass, as well as apply Spyglass configuration back into Snowflake access rules, at any time.

Index

Interfaces

Type Aliases

Variables

Functions

Generated using TypeDoc