Skip to content

Commit

Permalink
update dbt reference to use new recommended partition API (#17041)
Browse files Browse the repository at this point in the history
## Summary & Motivation

## How I Tested These Changes
  • Loading branch information
sryza authored Oct 5, 2023
1 parent b61fd7f commit aef58e5
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions docs/content/integrations/dbt/reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -690,13 +690,11 @@ from dagster_dbt import DbtCliResource, dbt_assets
partitions_def=DailyPartitionsDefinition(start_date="2023-01-01")
)
def partitionshop_dbt_assets(context: OpExecutionContext, dbt: DbtCliResource):
time_window = context.asset_partitions_time_window_for_output(
list(context.selected_output_names)[0]
)
start, end = context.partition_time_window
dbt_vars = {
"min_date": time_window.start.isoformat(),
"max_date": time_window.end.isoformat()
"min_date": start.isoformat(),
"max_date": end.isoformat()
}
dbt_build_args = ["build", "--vars", json.dumps(dbt_vars)]
Expand Down

1 comment on commit aef58e5

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for dagster-docs ready!

✅ Preview
https://dagster-docs-k8yokqxfg-elementl.vercel.app
https://master.dagster.dagster-docs.io

Built with commit aef58e5.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.