Relative Content

Tag Archive for dagster

Dagster having a daily partitioned asset depend on the previous partition

I have two assets my_asset_a which runs every day at 4pm and my_asset_b which runs every day at 6pm. Since my_asset_b runs after my_asset_a i’d like for my_asset_a to depend on the previous partition key of my_asset_b e.g. if the partition_key is 2024-07-08 i’d like my_asset_a to depend on the partition_key of 2024-07-07 for my_asset_b. The reason for this is I’d like flexibility to use my_asset_b as a dependency on both T and T-1

Dagster create a single shared asset

Using dagster I’d like to create a set of reusable assets in a single file where I’d like to be able to pass a country parameter and have different schedules for each country/schedule. The only way I know how to do this is via setting up separate asset files for each country and then define the schedule in the __init__.py file for each.