if i define an asset backed by a database table th...
# ask-community
c
if i define an asset backed by a database table that has already been backfilled, how do i signal to downstream jobs that past partitions have already been materialized?
c
Hi Chris. We don't have a great way to handle this at the moment, though ideally we would have support for this in Dagit. For now, the easiest way I can think of would be to run a job that yields materializations for all of the filled partitions, by doing something like this:
Copy code
@op
def yields_partition_materializations():
    partitions = [...]  # filled partitions
    for partition in partitions:
        yield AssetMaterialization(asset_key="my_asset", partition=partition)
    yield Output(5)


@job
def my_job():
    yields_partition_materializations()
c
ah got it, thank you! is there a way to do the opposite? to dematerialize an asset’s partitions?
c
Yep, one thing you can do is "wipe materializations" through Dagit's UI:
thank you box 1