Peter Davidson
12/19/2022, 8:25 PM@asset(partitions_def=MonthlyPartitionsDefinition(start_date='2018-02-01'))
def sales_data():
""" Refreshed automatically every month """
...
@op(config_schema={'discount_rate': float, 'rep_date': str})
def sales_with_discount():
# need to get sales data for a specific month here:
..
@graph
def graph_sales_discounted()
return sales_with_discount
# This job might be run many times with different discount rate
job_discounts = graph_sales_discounted.to_job(config={'ops': {'sales_with_discount': {'config': { 'discount_rate': 0.3, 'rep_date': '2022-09-30'}}}})
Adam Ward
12/20/2022, 1:30 PMPeter Davidson
12/20/2022, 1:38 PMdagster._check.CheckError: Invariant failed. Description: All leaf nodes within graph 'graph_with_asset' must generate outputs which are mapped to outputs of the graph, and produce assets. The following leaf node(s) are non-asset producing ops: {'concat_only'}. This behavior is not currently supported because these ops are not required for the creation of the associated asset(s).
Adam Ward
12/20/2022, 2:00 PMPeter Davidson
12/20/2022, 2:01 PMAdam Ward
12/20/2022, 3:01 PMPeter Davidson
12/20/2022, 3:04 PMAdam Ward
12/20/2022, 3:06 PMPeter Davidson
12/23/2022, 8:14 AMUserWarning: Error loading repository location dagster_poc:dagster._check.CheckError: Invariant failed. Description: Can't supply a ConfigMapping for 'config' when 'partitions_def' is supplied.
Terry Lines
02/14/2023, 6:02 PM