JCA User
02/10/2023, 4:01 PMorder_count_chart
. I was launching this from the tutorial_finished/
directory so I wouldn't have missed any steps (and can reproduce in my own version in tutorial_template/
).erin
02/10/2023, 4:02 PMJCA User
02/10/2023, 4:17 PMdagster._core.errors.DagsterExecutionHandleOutputError: Error ocurred while handling output "result" of step "order_count_chart":
dagster._check.CheckError: Invariant failed. Description: Unexpected 'None' output value. If a 'None' value is intentional, set the output type to None
It seems like this is breaking at the end of the definition of asset order_count_chart
. Maybe something changed in the newest version? I am using version 1.1.17
. Does the default behavior expect something returned?
In other places I've seen metadata being handled with return Output(some_val, metadata={some dict})
I am able to get it to work by returning any DataFrame object but was wondering if something funky is going on given that I was using the finished demo code.JCA User
02/10/2023, 4:18 PMerin
02/10/2023, 4:50 PMJCA User
02/10/2023, 6:00 PMjamie
02/10/2023, 7:01 PMjamie
02/10/2023, 7:10 PM-> None:
return type annotation to order_count_chart
like this
def order_count_chart(context, customers: pd.DataFrame) -> None:
jamie
02/10/2023, 8:33 PMdagster project from-example --name tutorial_dbt_dagster --example tutorial_dbt_dagster
you’ll get the updated projectJCA User
02/14/2023, 3:45 PMJCA User
02/14/2023, 3:46 PMjamie
02/14/2023, 4:52 PM@asset
def my_downstream_asset(upstream_asset):
return upstream_asset * 2
you could test it like this
my_downstream_asset(3)
and then ensure it returns the value you expect
For more complicated assets, sometimes it can be harder to debug like this since creating the upstream inputs can be really difficult. Depending on how you materialize your assets you can use pdb to do interactive debugging and i can give a quick example of that if you’d like. it’s also pretty basic, but putting a bunch of print or logging statements in the body of your assets can also be effective, and is generally what i reach to first when debugging.