Hello, I’m migrating some python workloads from Data Catalog to Dataplex catalog and I’m struggling with automating the aspect type deletion. Via the google-cloud-dataplex python SDK I’m able to add new aspect types to entries or schemas in entries but I could not find a way to remove them.
Let’s say I have an aspect type added to a field in a table schema, I want to remove it from there in a programmatic fashion, all I could find is the update_entry method that I used to add aspects in the first place via updating the underlying protobuf.
When via the UI I try to remove an aspect, I can see in the logs that the API request has an additional parameter call delete_missing_aspects, but there is nothing like data available in any of the dataplex classes and methods, I’m assuming this is a flag to hint the deletion to the internal engine.
It seems that the way to do it is by reconstructing the entry and trying to remove the specific aspect type and then trying to update_entry passing the entry without the aspect but I could not make it work.
Anyone has code snippet of how to achieve this?
The documentation I’ve been following: https://cloud.google.com/dataplex/docs/reference/rpc/google.cloud.dataplex.v1#google.cloud.dataplex.v1.CatalogService, https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-dataplex/samples/generated_samples
thanks!