<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: How to delete lineage metadata in apache atlas? in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-delete-lineage-metadata-in-apache-atlas/m-p/120673#M38897</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/10447/manoj-dhake.html" nodeid="10447"&gt;@Manoj Dhake&lt;/A&gt; &lt;/P&gt;&lt;P&gt;
	There are several super types in Atlas that most of the existing types inherit from. Two key super types are Process and DataSet. The Process type has two fields that play a key role in Lineage tracking, Inputs and Outputs.&lt;/P&gt;
&lt;PRE&gt;{"typeName":"Process","definition":{"enumTypes":[],"structTypes":[],"traitTypes":[],"classTypes":[{"superTypes":["Referenceable","Asset"],"hierarchicalMetaTypeName":"org.apache.atlas.typesystem.types.ClassType","typeName":"Process","typeDescription":null,"attributeDefinitions":[{"name":"inputs","dataTypeName":"array&amp;lt;DataSet&amp;gt;","multiplicity":"optional","isComposite":false,"isUnique":false,"isIndexable":true,"reverseAttributeName":null},{"name":"outputs","dataTypeName":"array&amp;lt;DataSet&amp;gt;","multiplicity":"optional","isComposite":false,"isUnique":false,"isIndexable":true,"reverseAttributeName":null}]}]},"requestId":"qtp1853177759-436 - 00d1cf83-1bc6-4b49-820f-d907e42c4c27"}
&lt;/PRE&gt;&lt;P&gt;In your case, the "create table if" entities are Process types and posses the Input and Output attributes. The reasons Atlas knows to connect EMR.PATIENT... and EMR.CONDITION... entities to the first "create table if" entity is that EMR.PATIENT and EMR.CONDITION are both entities based on DataSet types that are referenced in the Input field of "create table if" entity. Similarly the PATIENT360 entity is also of DataSet type that is referenced in the Output field of that same "create table if" entity. Here is a generic example with a Hive Table:&lt;/P&gt;&lt;PRE&gt;{"requestId":"qtp1853177759-388 - a98ad750-6fd7-41e9-8fbd-4117c844f8d1","definition":{"jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Reference","id":{"jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Id","id":"f118e893-ccca-4d37-9791-b33fb265d053","version":0,"typeName":"hive_process","state":"ACTIVE"},"typeName":"hive_process","values":{"queryId":"hive_20160816002633_af9920a4-3cca-461a-ab00-87c9454e5cba","name":"create table sample_11 as select * from sample_10 where salary &amp;gt; 60000","startTime":"2016-08-16T00:26:33.732Z","queryPlan":"{}","description":null,"operationType":"CREATETABLE_AS_SELECT","outputs":[{"jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Id","id":"e7d3a765-662e-4303-ab32-251f22234382","version":0,"typeName":"DataSet","state":"ACTIVE"}],"endTime":"2016-08-16T00:26:39.424Z","recentQueries":["create table sample_11 as select * from sample_10 where salary &amp;gt; 60000"],"inputs":[{"jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Id","id":"d24ee236-417e-4c12-ab0e-44bab7abb567","version":0,"typeName":"DataSet","state":"ACTIVE"}],"qualifiedName":"CREATETABLE_AS_SELECT:default.sample_10@sandbox-&amp;gt;:default.sample_11@sandbox","queryText":"create table sample_11 as select * from sample_10 where salary &amp;gt; 60000","owner":null,"clusterName":"Sandbox","queryGraph":null,"userName":"admin"},"traitNames":[],"traits":{}}}&lt;/PRE&gt;&lt;P&gt;This is and entity based on the hive_process type (resulting from a create table statement). Notice that the Input and Output fields contain entity references. If those fields were to be cleared or modified to contain fewer referenced, the resulting Lineage graph should change. Give it a try and respond with a comment if you have any follow-ups.&lt;/P&gt;</description>
    <pubDate>Tue, 30 Aug 2016 23:31:13 GMT</pubDate>
    <dc:creator>vvaks</dc:creator>
    <dc:date>2016-08-30T23:31:13Z</dc:date>
    <item>
      <title>How to delete lineage metadata in apache atlas?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-delete-lineage-metadata-in-apache-atlas/m-p/120672#M38896</link>
      <description>&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;I am using Atlas-Ranger Sandbox machine,on which i have executed some hive queries and getting lineage of tables in atlas UI,but &lt;/P&gt;&lt;P&gt;First time when i have executed hive query at that time, my input tables were coming from &lt;STRONG&gt;"medical" database &lt;/STRONG&gt;(condition_info and patient_information table) as shown in diagram.After some time we decided to take all input tables from &lt;STRONG&gt;"EMR" database then we &lt;/STRONG&gt;have executed same query and created "patient_cohort_table" and now in atlas UI i am getting lineage for &lt;STRONG&gt;"medical" database too&lt;/STRONG&gt; even though i have deleted those tables from hive.&lt;/P&gt;&lt;P&gt;In lineage diagram,the user only able to see lineage for emr database and not for medical database.To do this we need to delete lineage metdadata from apache atlas so&lt;/P&gt;&lt;P&gt;How to delete lineage metadata so that we will not get it's lineage in apache atlas?&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;please find attached lineage.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="6989-lineage.png" style="width: 1172px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/22872i1B5AB94D627CD3B2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="6989-lineage.png" alt="6989-lineage.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2019 10:32:50 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-delete-lineage-metadata-in-apache-atlas/m-p/120672#M38896</guid>
      <dc:creator>Manus</dc:creator>
      <dc:date>2019-08-19T10:32:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete lineage metadata in apache atlas?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-delete-lineage-metadata-in-apache-atlas/m-p/120673#M38897</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/10447/manoj-dhake.html" nodeid="10447"&gt;@Manoj Dhake&lt;/A&gt; &lt;/P&gt;&lt;P&gt;
	There are several super types in Atlas that most of the existing types inherit from. Two key super types are Process and DataSet. The Process type has two fields that play a key role in Lineage tracking, Inputs and Outputs.&lt;/P&gt;
&lt;PRE&gt;{"typeName":"Process","definition":{"enumTypes":[],"structTypes":[],"traitTypes":[],"classTypes":[{"superTypes":["Referenceable","Asset"],"hierarchicalMetaTypeName":"org.apache.atlas.typesystem.types.ClassType","typeName":"Process","typeDescription":null,"attributeDefinitions":[{"name":"inputs","dataTypeName":"array&amp;lt;DataSet&amp;gt;","multiplicity":"optional","isComposite":false,"isUnique":false,"isIndexable":true,"reverseAttributeName":null},{"name":"outputs","dataTypeName":"array&amp;lt;DataSet&amp;gt;","multiplicity":"optional","isComposite":false,"isUnique":false,"isIndexable":true,"reverseAttributeName":null}]}]},"requestId":"qtp1853177759-436 - 00d1cf83-1bc6-4b49-820f-d907e42c4c27"}
&lt;/PRE&gt;&lt;P&gt;In your case, the "create table if" entities are Process types and posses the Input and Output attributes. The reasons Atlas knows to connect EMR.PATIENT... and EMR.CONDITION... entities to the first "create table if" entity is that EMR.PATIENT and EMR.CONDITION are both entities based on DataSet types that are referenced in the Input field of "create table if" entity. Similarly the PATIENT360 entity is also of DataSet type that is referenced in the Output field of that same "create table if" entity. Here is a generic example with a Hive Table:&lt;/P&gt;&lt;PRE&gt;{"requestId":"qtp1853177759-388 - a98ad750-6fd7-41e9-8fbd-4117c844f8d1","definition":{"jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Reference","id":{"jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Id","id":"f118e893-ccca-4d37-9791-b33fb265d053","version":0,"typeName":"hive_process","state":"ACTIVE"},"typeName":"hive_process","values":{"queryId":"hive_20160816002633_af9920a4-3cca-461a-ab00-87c9454e5cba","name":"create table sample_11 as select * from sample_10 where salary &amp;gt; 60000","startTime":"2016-08-16T00:26:33.732Z","queryPlan":"{}","description":null,"operationType":"CREATETABLE_AS_SELECT","outputs":[{"jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Id","id":"e7d3a765-662e-4303-ab32-251f22234382","version":0,"typeName":"DataSet","state":"ACTIVE"}],"endTime":"2016-08-16T00:26:39.424Z","recentQueries":["create table sample_11 as select * from sample_10 where salary &amp;gt; 60000"],"inputs":[{"jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Id","id":"d24ee236-417e-4c12-ab0e-44bab7abb567","version":0,"typeName":"DataSet","state":"ACTIVE"}],"qualifiedName":"CREATETABLE_AS_SELECT:default.sample_10@sandbox-&amp;gt;:default.sample_11@sandbox","queryText":"create table sample_11 as select * from sample_10 where salary &amp;gt; 60000","owner":null,"clusterName":"Sandbox","queryGraph":null,"userName":"admin"},"traitNames":[],"traits":{}}}&lt;/PRE&gt;&lt;P&gt;This is and entity based on the hive_process type (resulting from a create table statement). Notice that the Input and Output fields contain entity references. If those fields were to be cleared or modified to contain fewer referenced, the resulting Lineage graph should change. Give it a try and respond with a comment if you have any follow-ups.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2016 23:31:13 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-delete-lineage-metadata-in-apache-atlas/m-p/120673#M38897</guid>
      <dc:creator>vvaks</dc:creator>
      <dc:date>2016-08-30T23:31:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete lineage metadata in apache atlas?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-delete-lineage-metadata-in-apache-atlas/m-p/120674#M38898</link>
      <description>&lt;P&gt;Hi vadim&lt;/P&gt;&lt;P&gt;You are saying to delete input and output entites but how to delete those using rest api?&lt;/P&gt;&lt;P&gt;Is there any rest api available for that?&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2016 22:26:20 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-delete-lineage-metadata-in-apache-atlas/m-p/120674#M38898</guid>
      <dc:creator>Manus</dc:creator>
      <dc:date>2016-09-01T22:26:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete lineage metadata in apache atlas?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-delete-lineage-metadata-in-apache-atlas/m-p/120675#M38899</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/10447/manoj-dhake.html" nodeid="10447"&gt;@Manoj Dhake&lt;/A&gt; &lt;/P&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;PRE&gt;curl -u admin:admin -d @{location of file}/data.json -X POST &lt;A href="https://sandbox.hortonworks.com:21000/api/atlas/entities/{guid}"&gt;https://sandbox.hortonworks.com:21000/api/atlas/entities/{guid}&lt;/A&gt;
&lt;/PRE&gt;&lt;P&gt;The payload (contents of the data.json file) should look something like this&lt;/P&gt;&lt;PRE&gt;{
  "jsonClass": "org.apache.atlas.typesystem.json.InstanceSerialization$_Reference",
  "id": {
    "jsonClass": "org.apache.atlas.typesystem.json.InstanceSerialization$_Id",
    "id": "f118e893-ccca-4d37-9791-b33fb265d053",
    "version": 0,
    "typeName": "hive_process",
    "state": "ACTIVE"
  },
  "typeName": "hive_process",
  "values": {
    "outputs": [
      
    ],    
    "inputs": [
      
    ],
  },
  "traitNames": [
    
  ],
  "traits": {
    
  }
}
&lt;/PRE&gt;&lt;P&gt;Basically, you just send the ID block of the target entity and then the values that you want to change. In this case, you only send the input and output values as blank arrays. That should clear those those fields and remove the lineage graph. If you only want to remove some of the lineage, then remove only the entity references that you don't want to see in the lineage graph. Let me know how that works out.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Sep 2016 19:47:41 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-delete-lineage-metadata-in-apache-atlas/m-p/120675#M38899</guid>
      <dc:creator>vvaks</dc:creator>
      <dc:date>2016-09-02T19:47:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete lineage metadata in apache atlas?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-delete-lineage-metadata-in-apache-atlas/m-p/120676#M38900</link>
      <description>&lt;P&gt;Thanks Vadim,&lt;/P&gt;&lt;P&gt;This works for me.&lt;/P&gt;&lt;P&gt;but suppose if i want to clear all metadata including tad metadata,hive relaed metadata etc. so Is it possible in atlas?&lt;/P&gt;&lt;P&gt;I dont want to re-install atlas but wants to only just clear metadata.I have configured "berkeley database" for storing the metadata information.Do you know how to access this graph based database?&lt;/P&gt;&lt;P&gt;and can we delete metadata by accessing this database?&lt;/P&gt;&lt;P&gt;How to take access of it?&lt;/P&gt;&lt;P&gt;If you know then could you please send me steps/additional software required to access graph database?&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2016 11:51:39 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-delete-lineage-metadata-in-apache-atlas/m-p/120676#M38900</guid>
      <dc:creator>Manus</dc:creator>
      <dc:date>2016-09-07T11:51:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete lineage metadata in apache atlas?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-delete-lineage-metadata-in-apache-atlas/m-p/120677#M38901</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/3656/vvaks.html" nodeid="3656"&gt;@Vadim Vaks&lt;/A&gt; &lt;/P&gt;&lt;P&gt;I'm trying to do the same thing with Atlas 0.8. But I can't delete entries within inputs or outputs array with this method.&lt;/P&gt;&lt;P&gt;With V2 API, elements didn't change. With V1 API, new elements are added even if I removed some from inputs array. The inputs had two entries before POST request, and I posted a single input entry and it got added:&lt;/P&gt;&lt;PRE&gt;      "inputs": [
        {
          "guid": "688ed1ee-222c-4416-8bf4-ba107b7fbc2c",
          "typeName": "kafka_topic"
        },
        {
          "guid": "bf3784db-fa59-4803-ad41-c5653f242f6f",
          "typeName": "kafka_topic"
        },
        {
          "guid": "688ed1ee-222c-4416-8bf4-ba107b7fbc2c",
          "typeName": "kafka_topic"
        }
      ],&lt;/PRE&gt;&lt;P&gt;Please let me know how to remove elements from inputs/outputs with Atlas 0.8.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 12 Apr 2017 23:11:10 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-delete-lineage-metadata-in-apache-atlas/m-p/120677#M38901</guid>
      <dc:creator>kkawamura</dc:creator>
      <dc:date>2017-04-12T23:11:10Z</dc:date>
    </item>
  </channel>
</rss>

