-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #126 from dagster-io/izzy/add_kinds
Fixed storage kind tags
- Loading branch information
Showing
17 changed files
with
93 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -153,23 +153,23 @@ jobs: | |
with: | ||
command: "ci set-build-output --location-name=snowflake_insights --image-tag=$IMAGE_TAG-snowflake-insights" | ||
|
||
# Build 'demo_assets' code location | ||
- name: Build and upload Docker image for demo_assets | ||
# Build 'hooli_data_ingest' code location | ||
- name: Build and upload Docker image for hooli_data_ingest | ||
if: steps.prerun.outputs.result != 'skip' | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: ./hooli-demo-assets | ||
context: ./hooli-data-ingest | ||
push: true | ||
tags: ${{ env.IMAGE_REGISTRY }}:${{ env.IMAGE_TAG }}-demo-assets | ||
tags: ${{ env.IMAGE_REGISTRY }}:${{ env.IMAGE_TAG }}-hooli-data-ingest | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
|
||
- name: Update build session with image tag for demo_assets | ||
id: ci-set-build-output-demo-assets | ||
- name: Update build session with image tag for hooli_data_ingest | ||
id: ci-set-build-output-hooli-data-ingest | ||
if: steps.prerun.outputs.result != 'skip' | ||
uses: dagster-io/dagster-cloud-action/actions/utils/[email protected] | ||
with: | ||
command: "ci set-build-output --location-name=demo_assets --image-tag=$IMAGE_TAG-demo-assets" | ||
command: "ci set-build-output --location-name=hooli_data_ingest --image-tag=$IMAGE_TAG-hooli-data-ingest" | ||
|
||
# Build pipes example container | ||
- name: Build and upload Docker image for pipes example | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from hooli_data_ingest.definitions import defs as defs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...s/hooli_demo_assets/schedules/__init__.py → ...t/hooli_data_ingest/schedules/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ | |
ScheduleDefinition, | ||
AssetSelection | ||
) | ||
from dagster._core.definitions.tags import StorageKindTagSet | ||
from dagster._core.definitions.tags import build_kind_tag | ||
from dagster_cloud.anomaly_detection import build_anomaly_detection_freshness_checks | ||
import pandas as pd | ||
from hooli_data_eng.utils.storage_kind_helpers import get_storage_kind | ||
|
@@ -31,10 +31,12 @@ | |
@asset( | ||
key_prefix="MARKETING", | ||
automation_condition=AutomationCondition.on_cron('0 0 1-31/2 * *'), | ||
compute_kind="pandas", | ||
owners=["team:programmers", "[email protected]"], | ||
ins={"company_perf": AssetIn(key_prefix=["ANALYTICS"])}, | ||
tags={**StorageKindTagSet(storage_kind=storage_kind)}, | ||
tags={ | ||
**build_kind_tag("pandas"), | ||
**build_kind_tag(storage_kind), | ||
}, | ||
) | ||
def avg_orders( | ||
context: AssetExecutionContext, company_perf: pd.DataFrame | ||
|
@@ -57,10 +59,12 @@ def check_avg_orders(context, avg_orders: pd.DataFrame): | |
|
||
@asset( | ||
key_prefix="MARKETING", | ||
compute_kind="pandas", | ||
owners=["team:programmers"], | ||
ins={"company_perf": AssetIn(key_prefix=["ANALYTICS"])}, | ||
tags={**StorageKindTagSet(storage_kind=storage_kind)}, | ||
tags={ | ||
**build_kind_tag("pandas"), | ||
**build_kind_tag(storage_kind), | ||
}, | ||
) | ||
def min_order(context, company_perf: pd.DataFrame) -> pd.DataFrame: | ||
"""Computes min order KPI""" | ||
|
@@ -77,10 +81,12 @@ def min_order(context, company_perf: pd.DataFrame) -> pd.DataFrame: | |
@asset( | ||
partitions_def=product_skus, | ||
io_manager_key="model_io_manager", | ||
compute_kind="hex", | ||
key_prefix="MARKETING", | ||
ins={"sku_stats": AssetIn(key_prefix=["ANALYTICS"])}, | ||
tags={**StorageKindTagSet(storage_kind="s3")}, | ||
tags={ | ||
**build_kind_tag("hex"), | ||
**build_kind_tag("s3"), | ||
}, | ||
) | ||
def key_product_deepdive(context, sku_stats): | ||
"""Creates a file for a BI tool based on the current quarters top product, represented as a dynamic partition""" | ||
|
Oops, something went wrong.