Hello all! I am wondering what the best way is to...
# ask-community
k
Hello all! I am wondering what the best way is to remove dynamic partition keys once they have been added (note: I don’t mean just removing the materializations, but also the keys). Is this something that can be done through graphql? Has anyone done this?
c
Hi Kate. You could do it within a sensor (untested code):
Copy code
dynamic_partitions_def = DynamicPartitionsDefinition(name="foo")

@sensor
def remove_dynamic_partitions_sensor(context):
    return SensorResult(
        dynamic_partitions_requests=[dynamic_partitions_def.build_delete_request(partition_keys)]
    )
currently this is not possible through graphQL, you'd have to do it through code
👍 1
k
Thanks Claire, I will try it out