Hi, How can I delete this invalid dataJob urn? I t...
# ingestion
s
Hi, How can I delete this invalid dataJob urn? I tried deleting the invalid urn with the command below, but failed to delete it. (attached a screenshot)
Copy code
datahub delete --urn "urn:li:dataJob:(urn:li:dataFlow:(airflow,commercial_commercial_type_r0,PROD),notebook_affiliate)" --hard
This is the invalid datajob urn
Copy code
https://.../tasks/urn:li:dataJob:(urn:li:dataFlow:(airflow,commercial_commercial_type_r0,PROD),notebook_affiliate)/Documentation?is_lineage_mode=false
s
Can you share the error stacktrace that you got from the failure?
s
I have no failure. invalid urn (airflow datajob) just exists with valid one.
When I clicked invalid urn, It shows empty page.
The only difference is environment value
Copy code
# invalid
https://.../tasks/urn:li:dataJob:(urn:li:dataFlow:(airflow,commercial_commercial_type_r0,PROD),notebook_affiliate)/Documentation?is_lineage_mode=false

# valid
https://.../tasks/urn:li:dataJob:(urn:li:dataFlow:(airflow,commercial_commercial_type_r0,prod),notebook_affiliate)/Documentation?is_lineage_mode=false
As far as I know, environment value should be ENUM (PROD), but in case of datajob urn, it requires lowercase.
b
@salmon-cricket-21860 Actually for this key, it shouldn't matter whether this field is upper or lower cased. For DataFlows, unlike Datasets, this field is called "cluster" and more correctly can be used to differentiate multiple Airflow clusters. This inconsistency is a legacy issue is not ideal, but will be partially addressed with the next generation of URNs which @orange-night-91387 is working on. Now there's another problem: You're still seeing the delete node under "Recently Viewed" - are you seeing this anywhere else? My guess is that Recently viewed is not verifying the existence of the URN, but instead simply looking for urn corresponding to pages you recently viewed. Does this sound correct @early-lamp-41924?
e
That is correct. Hmn so we need to do 2 things? a) check if entity exists by queryign for the key aspect and then b) check if they are soft deleted by querying for the status aspect
b
Yes that's most likely the answer. Until then we could see this stale metadata
s
Thanks for the answers all! Will watch the thread.