Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dagster #8

Merged
merged 4 commits into from
Feb 26, 2024
Merged

Dagster #8

merged 4 commits into from
Feb 26, 2024

Conversation

zoltanctoth
Copy link
Contributor

No description provided.

def get_metadata(self, dbt_resource_props: Mapping[str, Any]) -> Mapping[str, Any]:
metadata = {"partition_expr": "date"}
default_metadata = default_metadata_from_dbt_resource_props(dbt_resource_props)
return {**default_metadata, **metadata}

Choose a reason for hiding this comment

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

What is this function doing?

In our implementation, we use https://docs.dagster.io/_apidocs/libraries/dagster-dbt#dagster_dbt.DagsterDbtTranslator.get_group_name
I find it personally very nice to teach what a custom translator is doing

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm happy you like most of the code; it's @geoHeil 's after all ;)

(
first_partition,
last_partition,
) = context.asset_partitions_time_window_for_output(

Choose a reason for hiding this comment

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

We use each partition key run and I see for the first time that there is actually a possibility to pack the backfill in one call. I liked that

@@ -0,0 +1,19 @@
{% macro logging_and_variables() %}

Choose a reason for hiding this comment

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

i llke this one

assets=[dbtlearn_dbt_assets, dbtlearn_partitioned_dbt_assets],
schedules=schedules,
resources={
"dbt": DbtCliResource(project_dir=os.fspath(dbt_project_dir)),

Choose a reason for hiding this comment

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

Maybe this one can be imported from .constants

@zoltanctoth zoltanctoth merged commit 6609963 into main Feb 26, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants