Resource identifiers
Glean Resource Names (GRNs)
A Glean Resource Name or GRN is a way to reference Glean resources in a stable way. As a resource is changed, renamed, moved between collections, etc. its GRN will always remain the same.
Anatomy of a GRN
A GRN is comprised of three components: type, id, and alias, separated by :
type:id:alias
-
type
identifies the resource typedsb
: dashboardm
: modelpalette
: color palettesv
: saved exploration
-
id
is an globally unique identifier first assigned when the resource is created. The ID appears in the URL bar when viewing a resource. -
alias
is an optional unique identifier set by the user in the resource's DataOps config.
Not all 3 components are necessary to specify a GRN. The alias
can be omitted as long as an id
is present:
type:id
and, likewise, the id
can be omitted as long as an alias
is specified (note the double ::
):
type::alias
The following are all valid GRNs:
sv:6yYdOIMG9hCAAHqB
m:RNuzTq-85qzAFKJ8:2018_sales
dsb:SV9nqwUHWmyk1zka
dsb::daily_active_users
# some GRNs have longer IDs:
sv:a7905ae1-7f07-4c99-b9a5-930f409736a8
m:5948db01-0097-46fb-aec8-f68b1f09332d
dsb:658f8c83-c269-405c-ace6-677eece4c218:customers
GRNs are case sensitive.
Using GRNs
Linking existing resources to DataOps
All resources can be specified with the special grn
property to link a DataOps
config to an existing resource. This allows you to move a resource created in
the Glean web app into DataOps, without recreating it.
Referencing other resources
Anywhere you specify a filepath in a DataOps config, you may instead specify a GRN. This allows you to reference resources independently of how you structure your files.
Referencing dbt models
When referencing models imported by the dbt integration, the standard GRN format is valid. It is also possible to reference dbt models using the unique identifier of the dbt node representing the model:
dbt::dbtuniqueid
For example:
dbt::model.jaffle_shop.orders