Is there a way to wipe partitions from a DynamicPa...
# ask-ai
m
Is there a way to wipe partitions from a DynamicPartitionsDef from the UI?
s
As of the latest information available to me, there is no direct way to wipe partitions from a
DynamicPartitionsDefinition
through the Dagit UI. The documentation and discussions indicate that managing dynamic partitions, including the ability to delete them via the UI, has been a topic of interest among users, but it does not explicitly state that this feature has been implemented. However, you can programmatically manage dynamic partitions using the
DagsterInstance
methods
add_dynamic_partitions
and
delete_dynamic_partition
. For example, you can delete a dynamic partition by using the
delete_dynamic_partition
method as shown in the documentation:
Copy code
python @asset def my_asset(context):     context.instance.delete_dynamic_partition("my_partitions_def_name", "partition_key_to_delete")
This code snippet demonstrates how you can access the
DagsterInstance
from within an asset definition and call the
delete_dynamic_partition
method to remove a specific partition. For more advanced use cases or if you need to perform this operation from the UI, you might need to implement custom logic or use the available APIs to interact with the Dagster instance programmatically. Please note that the ability to manage dynamic partitions through the UI is a feature that has been requested by the community, and there are open discussions and issues on the topic. It's possible that this feature could be added in a future release of Dagster. For the most current information, you should check the latest Dagster release notes or the GitHub repository.