Skip to content

Is it possible to build an asset for which we can materialize multiple partitions in a single run without being in a backfill state? #17956

Answered by clairelin135
marcilj asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @marcilj, thanks for the detail here.

It is possible to kick off a run that targets all dynamic partitions for the given hour, though you'll need to change your dimension names so that the time dimension name is alphabetically before the crypto_token dimension name (this is admittedly awkward behavior, and I explain why this is the case in my comment here).

Once you do this, you can define a schedule that targets a partition range in one run:

@schedule(job=..., cron_schedule="@hourly")
def my_schedule(context):
    ...
    hour_partition_key = ...
    return RunRequest(
        tags={
            "dagster/asset_partition_range_start": MultiPartitionKey(
                {
              …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@the4thamigo-uk
Comment options

Answer selected by clairelin135
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
area: partitions Related to Partitions
3 participants