You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@atlas.apache.org by "Shreeya (Jira)" <ji...@apache.org> on 2021/09/07 00:27:00 UTC
[jira] [Commented] (ATLAS-4415) Create Hive UDF functions to access
Atlas metadata and Business Metadata from Hive including Hive CLI/beeline.
[ https://issues.apache.org/jira/browse/ATLAS-4415?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17410851#comment-17410851 ]
Shreeya commented on ATLAS-4415:
--------------------------------
The code submitted contributes a custom HIVE UDTF tailer made for accessing Atlas data from Hive CLI tools like beeline.
{{To access the atlas metadata from Hive Beeline,}}{{the users have to do the following three steps.}}
{{1. Add the jar files built in <Atlas-CodeRoot>/integrations/hive/target/atlas-integrations-hive-3.0.0-SNAPSHOT.jar as shown below.}}
{{ add jar /tmp/atlas-integrations-hive-3.0.0-SNAPSHOT.jar;add jar /tmp/atlas-integrations-hive-3.0.0-SNAPSHOT.jar;}}
{{2. Create a temporary function as shown below.}}
{{ create temporary function atlasgetmd as 'org.apache.atlas.integrations.hive.AtlasGetMd';}}
{{3. execute a query as shown below to invoke atlasgetmd UDTF on a single row table.}}
{{ select atlasgetmd('${atlas-server-url}:31000' , "admin","admin123","Asset") from one_row_table;}}
{{For e.g. the following query will produce the results as shown below the query. "Asset" is the entityType whose metadata objects are being retrieved.}}{{NOTE: The UDTF is UDF used for it. This query executed on a support table "one_row_table" that has one and only one row. It is important that the source table has one row.}}{{select atlasgetmd(''${atlas-server-url}:31000':31000' , "atlas userName","atlas password","Asset") from one_row_table}}
{{INFO : Completed executing command(queryId=hive_20210906171135_2c000e30-2883-457d-80a9-96a2ff02317c); Time taken: 0.016 seconds}}
{{INFO : OK}}
{{+---------------------------------------+-------------------------+-----------+--------------+-----------+------------+----------------+-------------+------------+----------+--------------+--------------+----------+--------+--------------+------------------+}}
{{| guid | qualifiedname | name | description | category | createdby | createtime | updatetime | updatedby | version | servicetype | typeversion | options | owner | displayname | userdescription |}}
{{+---------------------------------------+-------------------------+-----------+--------------+-----------+------------+----------------+-------------+------------+----------+--------------+--------------+----------+--------+--------------+------------------+}}
{{| a3efad36-01b8-478e-93ab-6ba1d1182a2d | /warehouse/Employee@cm | Employee | | | | 1627455600000 | | | | | | | | | |}}
{{+---------------------------------------+-------------------------+-----------+--------------+-----------+------------+----------------+-------------+------------+----------+--------------+--------------+----------+--------+--------------+------------------+}}
{{1 row selected (9.896 seconds)}}
> Create Hive UDF functions to access Atlas metadata and Business Metadata from Hive including Hive CLI/beeline.
> --------------------------------------------------------------------------------------------------------------
>
> Key: ATLAS-4415
> URL: https://issues.apache.org/jira/browse/ATLAS-4415
> Project: Atlas
> Issue Type: Improvement
> Components: hive-integration
> Reporter: Shreeya
> Assignee: Shreeya
> Priority: Minor
> Attachments: 0001-First-working-version-of-AtlasGetMd.patch
>
>
> Hello All,
> I am thinking that metadata and business metadata should be accessible from Hive CLI tools like beeline using custom UDF functions. This will give the users a two way communication between Hive and Atlas. This can be done using HIVE UDF and Atlas Client libraries.
>
> Regards,
> Shreeya
--
This message was sent by Atlassian Jira
(v8.3.4#803005)