Docs
Resource Identifiers

Resource identifiers

Global Resource Names (GRNs)

A Global Resource Name or GRN is a way to reference Hashboard 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 type

    • dsb: Dashboard
    • m: Model
    • mtr: Project Metric
    • palette: Color Palette
    • sv: 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 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::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 configs to existing resources

All resources can be specified with the special grn property to link a Hashboard config to an existing resource. This allows you to move a resource created in the Hashboard web app to be code-controlled, without recreating it.

Referencing other resources

Anywhere you specify a filepath in a Hashboard config, you may instead specify a GRN. This allows you to reference resources independently of how you structure your files.

For human readable references we recommend setting the alias field in the config you wish to reference and use the double colon type::alias syntax where you would otherwise use filepath or id references.