is it possible to have external assets with partit...
# ask-ai
m
is it possible to have external assets with partitions?
s
Yes, it is possible to have external assets with partitions. The documentation provides an example where the
@observable_source_asset
decorator is used with a
partitions_def
argument to define an observable source asset with partitions. Here's a code snippet from the documentation that demonstrates this:
Copy code
python from dagster import DataVersionsByPartition, StaticPartitionsDefinition, observable_source_asset  @observable_source_asset(     partitions_def=StaticPartitionsDefinition(["a", "b"]) ) def foo():     return DataVersionsByPartition({"a": "alpha", "b": "beta"})
In this example, the observable source asset
foo
is defined with two partitions, "a" and "b", and it returns a
DataVersionsByPartition
object that maps each partition to a data version.