Mat Partridge
02/16/2024, 8:30 AMScout
02/16/2024, 8:31 AMAutoMaterializePolicy
can be set to eager
, which means that an asset will be refreshed anytime its upstream data is updated. This is typically set at the asset level, and the documentation provides an example of how to use this policy with a regular asset.
Here's an example from the documentation:
python
from dagster import AutoMaterializePolicy, asset
@asset(
auto_materialize_policy=AutoMaterializePolicy.eager(),
)
def my_ml_model(my_data):
...
In the case of dynamic assets, if they are defined using the same @asset
decorator and can be associated with an AutoMaterializePolicy
, then it's conceivable that they could also be auto-materialized based on the policy's conditions. However, the specifics of how dynamic asset factories interact with auto-materialization policies are not detailed in the documentation.
If you are looking to implement auto-refresh behavior for dynamic assets and the documentation does not provide a clear solution, you might consider reaching out to the community or exploring the possibility of contributing to the project to add this feature if it aligns with the project's goals and architecture. assets that can be updated incrementally... button How to trigger a full refresh of dbt inc... button auto-refresh asset job page button How do I trigger a full refresh of incre... button Thank you for your feedback!