Skip to content

Commit

Permalink
Update deploy-with-dagster.md
Browse files Browse the repository at this point in the history
Changing resource name from DltResource to DltPipeline
  • Loading branch information
zem360 authored Apr 2, 2024
1 parent 79e456d commit 17c15aa
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ More details can be found in the article
from dagster import ConfigurableResource
import dlt
class DltResource(ConfigurableResource):
class DltPipeline(ConfigurableResource):
pipeline_name: str
dataset_name: str
destination: str
Expand All @@ -97,7 +97,7 @@ More details can be found in the article
1. Define the asset as:
```py
@asset
def issues_pipeline(pipeline: DltResource):
def issues_pipeline(pipeline: DltPipeline):
logger = get_dagster_logger()
results = pipeline.create_pipeline(github_issues_resource, table_name='github_issues')
Expand All @@ -108,16 +108,18 @@ More details can be found in the article

1. Next, define Dagster definitions as follows:
```py
import DltResource
all_assets = load_assets_from_modules([assets])
simple_pipeline = define_asset_job(name="simple_pipeline", selection= ['issues_pipeline'])
defs = Definitions(
assets=all_assets,
jobs=[simple_pipeline],
resources={
"pipeline": DltResource(),
"pipeline": DltPipeline(
pipeline_name = "github_issues",
dataset_name = "dagster_github_issues",
destination = "bigquery",
),
}
)
```
Expand Down

0 comments on commit 17c15aa

Please sign in to comment.