Hello guys! I soft deleted all entities and forced...
# ingestion
g
Hello guys! I soft deleted all entities and forced new ingestion to make a full update. But, the Status aspect did not update after the ingestion. It's right? Is this expected?
I suppose that to update the status aspect, the ingestion should ingest the Status aspect with the value "removed:false" right?
g
Yup currently you’ll need to manually emit a status aspect with removed=false for each of the new urns
Ideally our ingestion framework should do this automatically, but unfortunately that’s not yet the case
c
Hi, I did soft delete, but not ingestion is running, but I don’t see the items, may I know where I need to set “removed:false”?
g
Hello Lambert! You can change this via SQL. You just need to change the status aspect on the table metadata_aspect_v2 or you can use the emitter to send the status aspect to the server to force "removed=false"
c
ok, thanks. I will give a try
sorry, one more question how do i add in emitter?
g
If you run the SQL, you need to execute the restore indices job to update your elasticsearch indices
You can use the datahub sdk to emit the metadata. You can find more about in the docs
@careful-engine-38533 Some docs: Emitter SDK: https://datahubproject.io/docs/metadata-ingestion/as-a-library Example: https://github.com/datahub-project/datahub/blob/master/metadata-ingestion/examples/library/dataset_add_documentation.py You will need to ingest this spect: https://datahubproject.io/docs/generated/metamodel/entities/dataset#statu For this, import the status class and do exact the same as the code example above:
Copy code
from datahub.metadata.schema_classes import (
    StatusClass
)
Create the MetadataChangeProposal class and emit.
You just need to know the entity urns to emit metadata
c
Thanks @gentle-camera-33498, This helps a lot