<@U0667DNC02Y>: AssetSelection all Assets without ...
# ask-ai
j
@Scout: AssetSelection all Assets without downstream dependecy
s
To select all assets that do not have downstream dependencies within an asset selection, you can use the
AssetSelection.sinks()
method. According to the documentation, this method returns a new asset selection that contains all of the sink assets within the original asset selection. A sink asset is defined as an asset that has no downstream dependencies within the asset selection, although it can have downstream dependencies outside of the asset selection. Here is an example of how you might use `AssetSelection.sinks()`:
Copy code
python
# Assuming you have an existing asset selection `my_asset_selection`
sink_assets = AssetSelection.sinks(my_asset_selection)
This will give you a selection of all assets that are considered sinks within the context of
my_asset_selection
. If you want to include the asset checks targeting the returned assets, they will be included by default with the sink assets. Dagster Docs button Skipping an asset materialization withou... button Dependencies between graph-backed assets... button How to trigger downstream dbt assets for... button Thank you for your feedback!