<?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 Atlas: Is there a way to tag a mass amount of tables at once in Atlas? in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Atlas-Is-there-a-way-to-tag-a-mass-amount-of-tables-at-once/m-p/232506#M70177</link>
    <description>&lt;P&gt;I'm trying to tag thousands of tables in Atlas based on the sensitivity level of the data. Does anyone know of a way to do this without manually tagging each table? I've read about the REST API but can't find a solution in the docs. &lt;/P&gt;</description>
    <pubDate>Tue, 24 Oct 2017 20:28:35 GMT</pubDate>
    <dc:creator>mayo_012</dc:creator>
    <dc:date>2017-10-24T20:28:35Z</dc:date>
    <item>
      <title>Atlas: Is there a way to tag a mass amount of tables at once in Atlas?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Atlas-Is-there-a-way-to-tag-a-mass-amount-of-tables-at-once/m-p/232506#M70177</link>
      <description>&lt;P&gt;I'm trying to tag thousands of tables in Atlas based on the sensitivity level of the data. Does anyone know of a way to do this without manually tagging each table? I've read about the REST API but can't find a solution in the docs. &lt;/P&gt;</description>
      <pubDate>Tue, 24 Oct 2017 20:28:35 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Atlas-Is-there-a-way-to-tag-a-mass-amount-of-tables-at-once/m-p/232506#M70177</guid>
      <dc:creator>mayo_012</dc:creator>
      <dc:date>2017-10-24T20:28:35Z</dc:date>
    </item>
    <item>
      <title>Re: Atlas: Is there a way to tag a mass amount of tables at once in Atlas?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Atlas-Is-there-a-way-to-tag-a-mass-amount-of-tables-at-once/m-p/232507#M70178</link>
      <description>&lt;P&gt;
	&lt;A rel="user" href="https://community.cloudera.com/users/46215/mayo-012.html" nodeid="46215"&gt;@Aaron Mayo&lt;/A&gt;&lt;/P&gt;&lt;P&gt;
	This can be accomplished using V2 APIs. &lt;/P&gt;&lt;P&gt;
	POST request body example :&lt;/P&gt;&lt;P&gt;
&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;{ "classification":{ "typeName":"PII","attributes":{ "attrib1":"value1","attrib2":"value2"}},"entityGuids":[ "05c97069-dc36-4f26-b017-13582c42428a","4b3fb1fa-0755-4329-8ecb-7e53e18ed128","6b3e5b42-e09b-428a-89ad-9ae38690044a","7593f4ed-9cd2-46ba-b0a7-b92229301476","f21ee4aa-461c-4eeb-8945-31ac8ec648d6"]} &lt;/PRE&gt;&lt;/DIV&gt;&lt;DIV&gt;API:&lt;/DIV&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;A href="http://atlas_host:21000/api/atlas/v2/entity/bulk/classification" target="_blank"&gt;http://atlas_host:21000/api/atlas/v2/entity/bulk/classification&lt;/A&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;P&gt;In the JSON ,&lt;/P&gt;&lt;P&gt;i) PII is the tag name&lt;/P&gt;&lt;P&gt;ii)attributes is the attribute name , value map &lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt;iii)"entityGuids" json array is the list of the GUIDs of the entities that have to be tagged. &lt;/DIV&gt;&lt;DIV&gt;Please refer &lt;A href="http://atlas.apache.org/api/v2/resource_EntityREST.html#resource_EntityREST_addClassification_POST" target="_blank"&gt;http://atlas.apache.org/api/v2/resource_EntityREST.html#resource_EntityREST_addClassification_POST&lt;/A&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 25 Oct 2017 01:07:49 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Atlas-Is-there-a-way-to-tag-a-mass-amount-of-tables-at-once/m-p/232507#M70178</guid>
      <dc:creator>ssainath</dc:creator>
      <dc:date>2017-10-25T01:07:49Z</dc:date>
    </item>
    <item>
      <title>Re: Atlas: Is there a way to tag a mass amount of tables at once in Atlas?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Atlas-Is-there-a-way-to-tag-a-mass-amount-of-tables-at-once/m-p/232508#M70179</link>
      <description>&lt;P&gt;@sharmadha would you know how to get the GUIDs from tables in hive? &lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2017 02:15:05 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Atlas-Is-there-a-way-to-tag-a-mass-amount-of-tables-at-once/m-p/232508#M70179</guid>
      <dc:creator>mayo_012</dc:creator>
      <dc:date>2017-10-25T02:15:05Z</dc:date>
    </item>
    <item>
      <title>Re: Atlas: Is there a way to tag a mass amount of tables at once in Atlas?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Atlas-Is-there-a-way-to-tag-a-mass-amount-of-tables-at-once/m-p/232509#M70180</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/46215/mayo-012.html" nodeid="46215"&gt;@Aaron Mayo&lt;/A&gt;
&lt;/P&gt;&lt;P&gt;GUIDS are generated by Atlas.Each Atlas entity has a unique GUID. You can get GUID of a table from UI , or by firing search query and writing a script on top of it to parse the GUIDS in the resulting JSON. For example , if you want to fetch the GUIDs of all tables in database default , &lt;/P&gt;&lt;P&gt;DSL query = hive_db where db.name="default"&lt;/P&gt;&lt;P&gt;Encoded :&lt;/P&gt;&lt;PRE&gt;&lt;A href="http://atlas_host:21000/api/atlas/v2/search/dsl?offset=0&amp;amp;query=db.name%3D%22default%22&amp;amp;typeName=hive_table" target="_blank"&gt;http://atlas_host:21000/api/atlas/v2/search/dsl?offset=0&amp;amp;query=db.name%3D%22default%22&amp;amp;typeName=hive_table&lt;/A&gt;&lt;/PRE&gt;&lt;P&gt;Following is the JSON response attached as an image :&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/41511-dsl-query-result.png"&gt;dsl-query-result.png&lt;/A&gt;&lt;/P&gt;&lt;P&gt;From this , &lt;/P&gt;&lt;P&gt;json["entities"][0]["guid"],json["entities"][1]["guid"] ... json["entities"][n]["guid"] can be extracted. &lt;/P&gt;&lt;P&gt;If you want to get GUID of only 1 table , instead of writing script , you can get it directly from the UI. When you click on an hive_table entity in Atlas, it takes you to &lt;A href="http://atlas_host:21000/#!/detailPage/&amp;lt;GUID" target="_blank"&gt;http://atlas_host:21000/#!/detailPage/&amp;lt;GUID&lt;/A&gt; of the entity&amp;gt;&lt;/P&gt;&lt;P&gt;Example : &lt;A href="http://atlas_host:21000/#!/detailPage/c44d0207-3567-4573-baaf-577ecbb8e195" target="_blank"&gt;http://atlas_host:21000/#!/detailPage/c44d0207-3567-4573-baaf-577ecbb8e195&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Here c44d0207-3567-4573-baaf-577ecbb8e195 is the GUID of the hive_table entity .&lt;/P&gt;&lt;P&gt;Since , going to UI and getting the GUID for all tables is tedious and manual process , it is preferred to fire query which fetches required tables and fetch GUIDS using a script.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2017 13:55:55 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Atlas-Is-there-a-way-to-tag-a-mass-amount-of-tables-at-once/m-p/232509#M70180</guid>
      <dc:creator>ssainath</dc:creator>
      <dc:date>2017-10-25T13:55:55Z</dc:date>
    </item>
  </channel>
</rss>

