Exposures

Exposures

Add exposures to your DAG.

Add exposures to your DAG.

Overview

Exposures are data assets that reference to a downstream use of your project's data. This could encompass a dashboard, an application, a Python notebook, or a data science project. An exposure groups all relevant upstream assets together to define the data required for external use. By employing exposures, you can:

  • Group multiple assets together to assess whether all upstream dependencies have been refreshed for a specific exposure and effortlessly refresh the data if needed.

  • Provide additional context to external data consumers in the exposure data catalog pages.

Exposure properties as code

Required

name: Assets in a Y42 space share the same namespace. Each asset must have a unique name.

type: Choose the type of downstream use of your data. Possible types are dashboard, notebook, analysis, ml, application

owner: Choose the person responsible for maintaining the exposure. Either the name or the email is required.

daily_purchases_update.yml

_24
version: 2
_24
_24
exposures:
_24
- name: daily_purchases_update
_24
type: dashboard
_24
owner:
_24
name: Lea Dang
_24
email: lea.dang@y42.com
_24
_24
depends_on:
_24
- ref('stg_purchases')
_24
- source('shop_source','purchases')
_24
_24
maturity: high
_24
url: https://bi.tool/purchases-dashboard
_24
_24
description: Daily updated dashboard of all purchases.
_24
tags:
_24
- purchases
_24
meta:
_24
experts:
_24
users:
_24
- lea.dang@y42.com
_24
teams: []

Expected

depends_on: Links the exposure to the upstream dependencies via the ref and source functions.

daily_purchases_update.yml

_24
version: 2
_24
_24
exposures:
_24
- name: daily_purchases_update
_24
type: dashboard
_24
owner:
_24
name: Lea Dang
_24
email: lea.dang@y42.com
_24
_24
depends_on:
_24
- ref('stg_purchases')
_24
- source('shop_source','purchases')
_24
_24
maturity: high
_24
url: https://bi.tool/purchases-dashboard
_24
_24
description: Daily updated dashboard of all purchases.
_24
tags:
_24
- purchases
_24
meta:
_24
experts:
_24
users:
_24
- lea.dang@y42.com
_24
teams: []

Optional

maturity: Classifies the degree of advancement of the exposure as high, medium, or low. For instance, a Python notebook designed for exploratory data analysis usually has a lower maturity level as a fully developed dashboard.

url: Links to the external page where the data is used.

daily_purchases_update.yml

_24
version: 2
_24
_24
exposures:
_24
- name: daily_purchases_update
_24
type: dashboard
_24
owner:
_24
name: Lea Dang
_24
email: lea.dang@y42.com
_24
_24
depends_on:
_24
- ref('stg_purchases')
_24
- source('shop_source','purchases')
_24
_24
maturity: high
_24
url: https://bi.tool/purchases-dashboard
_24
_24
description: Daily updated dashboard of all purchases.
_24
tags:
_24
- purchases
_24
meta:
_24
experts:
_24
users:
_24
- lea.dang@y42.com
_24
teams: []

General

descriptions, tags, experts: Include all the standard asset metadata if needed.

daily_purchases_update.yml

_24
version: 2
_24
_24
exposures:
_24
- name: daily_purchases_update
_24
type: dashboard
_24
owner:
_24
name: Lea Dang
_24
email: lea.dang@y42.com
_24
_24
depends_on:
_24
- ref('stg_purchases')
_24
- source('shop_source','purchases')
_24
_24
maturity: high
_24
url: https://bi.tool/purchases-dashboard
_24
_24
description: Daily updated dashboard of all purchases.
_24
tags:
_24
- purchases
_24
meta:
_24
experts:
_24
users:
_24
- lea.dang@y42.com
_24
teams: []

Required

name: Assets in a Y42 space share the same namespace. Each asset must have a unique name.

type: Choose the type of downstream use of your data. Possible types are dashboard, notebook, analysis, ml, application

owner: Choose the person responsible for maintaining the exposure. Either the name or the email is required.

Expected

depends_on: Links the exposure to the upstream dependencies via the ref and source functions.

Optional

maturity: Classifies the degree of advancement of the exposure as high, medium, or low. For instance, a Python notebook designed for exploratory data analysis usually has a lower maturity level as a fully developed dashboard.

url: Links to the external page where the data is used.

General

descriptions, tags, experts: Include all the standard asset metadata if needed.

daily_purchases_update.yml

_24
version: 2
_24
_24
exposures:
_24
- name: daily_purchases_update
_24
type: dashboard
_24
owner:
_24
name: Lea Dang
_24
email: lea.dang@y42.com
_24
_24
depends_on:
_24
- ref('stg_purchases')
_24
- source('shop_source','purchases')
_24
_24
maturity: high
_24
url: https://bi.tool/purchases-dashboard
_24
_24
description: Daily updated dashboard of all purchases.
_24
tags:
_24
- purchases
_24
meta:
_24
experts:
_24
users:
_24
- lea.dang@y42.com
_24
teams: []

Exposure definition in the data catalog

Add a new exposure to your DAG.

Exposure build statement

Lineage of exposure's dependencies.

Lineage of exposure's dependencies.

After you have created an exposure and linked all of its dependencies, you can use the following command to build all the assets that feed into your exposure. The build command uses the:

  • exposure function to select the exposure's dependencies.
  • + operator to select the parents of the exposure's dependencies.
CLI

_10
y42 build -s +exposure:exposure_name