Build command examples

Using the plus (+) operator

Select a specific model

Select model_1 only.

CLI

y42 build -s model_1

Directed acyclic graph (DAG).

Directed acyclic graph (DAG).

Select all downstream assets

Select model_1 and all of its downstream dependencies.

CLI

y42 build -s model_1+

Directed acyclic graph (DAG).

Directed acyclic graph (DAG).

Select all upstream assets

Select model_2 and all of its upstream dependencies.

CLI

y42 build -s +model_2

Directed acyclic graph (DAG).

Directed acyclic graph (DAG).

Select all upstream and downstream assets

Select model_1 and all of its upstream and downstream dependencies.

CLI

y42 build -s +model_1+

Directed acyclic graph (DAG).

Directed acyclic graph (DAG).

Using set operators

Unions

Running y42 build with a whitespace-separation between options selects the union of all the options provided. All assets that fulfill the selection criteria for at least one option are selected.

CLI

_10
y42 build -s +model_1 model_2+

Intersections

On the other hand, running y42 build with a comma-separation between options without whitespaces selects the intersection of all the options provided. Only assets that fulfill the selection criteria for all options are selected.

CLI

_10
y42 build -s +model_1,model_2+

Combining flags and operators

Select the intersection of two options

Select assets that are upstream from model_3 (inclusive) but also downstream from model_1 (inclusive).

CLI

y42 build -s +model_3,model_1+

Directed acyclic graph (DAG).

Directed acyclic graph (DAG).

Select and exclude assets simultaneously

Select all upstream and downstream assets from model_1 but exclude a specified source, src_shopify

CLI

y42 build -s +model_1+ --exclude source:src_shopify

Directed acyclic graph (DAG).

Directed acyclic graph (DAG).

Other operators

Select assets that are N edges away

Select src_shopify and assets that are up two 2 edges away.

CLI

y42 build -s source:src_shopify+2

Directed acyclic graph (DAG).

Directed acyclic graph (DAG).

Select an asset's children and all the parents of its children

Select src_hubspot and all of its children, plus all the upstream assets of its children

CLI

y42 build -s @source:src_hubspot+

Directed acyclic graph (DAG).

Directed acyclic graph (DAG).

Supply custom variables

CLI

_10
y42 build -s +my_exposure --vars '{key: value, date: 20180101}'