Skip to content

Commit

Permalink
adding a prefix to an asset
Browse files Browse the repository at this point in the history
  • Loading branch information
tacastillo committed Jul 27, 2023
1 parent a6200b8 commit 234865c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions dagster_university/assets/metrics.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from dagster import asset, AssetIn, MetadataValue
from dagster import asset, AssetKey, MetadataValue
from dagster_duckdb import DuckDBResource

import plotly.express as px
Expand All @@ -12,7 +12,7 @@
from ..partitions import weekly_partition

@asset(
deps=["taxi_trips"],
deps=[AssetKey(["taxi_trips"])],
partitions_def=weekly_partition,
)
def trips_by_week(context, database: DuckDBResource):
Expand Down Expand Up @@ -61,7 +61,8 @@ def trips_by_week(context, database: DuckDBResource):

## Lesson 4 (later part)
@asset(
deps=["taxi_trips", "taxi_zones"]
deps=[AssetKey(["taxi_trips"]), AssetKey(["taxi_zones"])],
key_prefix="manhattan"
)
def manhattan_stats(database: DuckDBResource):
"""
Expand Down Expand Up @@ -91,7 +92,7 @@ def manhattan_stats(database: DuckDBResource):

## Lesson 4 (later part)
@asset(
deps=["manhattan_stats"]
deps=[AssetKey(["manhattan", "manhattan_stats"])]
)
def manhattan_map(context):
"""
Expand Down

0 comments on commit 234865c

Please sign in to comment.