- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Is it possible in Apache Atlas to add key-value pairs to entities metadata?
- Labels:
-
Apache Atlas
Created 10-11-2017 03:47 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
For instance, a user wants to add some key-values attributes or annotations to a table, field, entity without using traits or terms?
Thank you!
Created 10-11-2017 07:46 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
First let's cover Entities vs Types. Think of this the same way as the relation between Object and Class in Object-Oriented Program. The "Entity" (your table) is an instance of "Type" (hive_table). As such, an Entity can only contain attributes defined in the "Type".
You can add metadata/attributes to an Entity (e.g. my_demo_table) using the REST API. However, you must first update the "Type" (e.g. hive_table) first with that particular attribute.
So, for example, if you would like to add a new attribute called "Department" to a particular table, then you would have to add that attribute first in "hive_table" Type. After that you would be able to set the attribute value in your Entity "my_demo_table".
Created 10-11-2017 07:46 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
First let's cover Entities vs Types. Think of this the same way as the relation between Object and Class in Object-Oriented Program. The "Entity" (your table) is an instance of "Type" (hive_table). As such, an Entity can only contain attributes defined in the "Type".
You can add metadata/attributes to an Entity (e.g. my_demo_table) using the REST API. However, you must first update the "Type" (e.g. hive_table) first with that particular attribute.
So, for example, if you would like to add a new attribute called "Department" to a particular table, then you would have to add that attribute first in "hive_table" Type. After that you would be able to set the attribute value in your Entity "my_demo_table".
Created 10-13-2017 09:49 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you. Is it possible to add a tag to "hive_table" type? So business users can edit the tag on the go and also the attributes assigned to all hive tables. Is it possible to use this work around?
Created 10-13-2017 09:57 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can create a Tag that accepts attributes. For example, an "Expiry_Date" tag that contains an attribute named "date". You can associate that tag directly to your table or column. At the time of association, the user will be asked to fill out the "date" value for that particular entity/instance.
So, yes, this could be a workaround.
Created 10-13-2017 10:39 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ok, can I add a tag directly to the type? So, for example, each hive_table has Exp_Date tag.
Created 10-13-2017 01:02 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No, tags are associated to entities. If you want something associated with a type then just add an attribute to it.
