Glossary.md 14.7 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11
---
name: Glossary
route: /Glossary
menu: Documentation
submenu: Features
---
import  themen  from 'theme/styles/styled-colors';
import  * as theme  from 'react-syntax-highlighter/dist/esm/styles/hljs';
import SyntaxHighlighter from 'react-syntax-highlighter';

import Img from 'theme/components/shared/Img'
12 13 14 15 16 17 18 19

# Glossary

A Glossary provides appropriate vocabularies for business users and it allows the terms (words) to be related to each
other and categorized so that they can be understood in different contexts. These terms can be then mapped to assets
like a Database, tables, columns etc. This helps abstract the technical jargon associated with the repositories and
allows the user to discover/work with data in the vocabulary that is more familiar to them.

20 21
### Use cases

22 23 24 25 26 27 28
* Ability to define rich glossary vocabularies using the natural terminology (technical terms and/or business terms).
* Ability to semantically relate the term(s) to each other.
* Ability to map assets to glossary terms(s).
* Ability to organize these terms by categories. This adds more context to the term(s).
* Allow categories to be arranged in hierarchy - to express broader and finer scopes.
* Separate management of glossary term(s) from the metadata.

29
### What is a Glossary term ?
30 31 32 33 34 35 36 37 38 39 40 41 42

A term is a useful word for an enterprise. For the term(s) to be useful and meaningful, they need to grouped around their
use and context. A term in Apache Atlas must have a unique qualifiedName, there can be term(s) with same name but they
cannot belong to the same glossary. Term(s) with same name can exist only across different glossaries. A term name can
contain spaces, underscores and dashes (as natural ways of referring to words) but no "." or "@", as the qualifiedName
takes the following form `term name`@`glossary qualified name`. The fully qualified name makes it easier to work with
a specific term.

A term can only belong to single glossary and it's lifecycle is bound to the same i.e. if the Glossary is deleted then
the term gets deleted as well. A term can belong to zero or more categories, which allows scoping them into narrower or
wider contexts. A term can be assigned/linked to zero or more entities in Apache Atlas. A term can be classified using
classifications (tags) and the same classification gets applied to the entities that the term is assigned to.

43
### What is a Glossary category ?
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81

A category is a way of organizing the term(s) so that the term's context can be enriched. A category may or may not have
contained hierarchies i.e. child category hierarchy. A category's qualifiedName is derived using it's hierarchical location
within the glossary e.g. `Category name`.`parent category qualifiedName`. This qualified name gets updated when any
hierarchical change happens, e.g. addition of a parent category, removal of parent category or change of parent category.

### UI interactions

Apache Atlas UI has been updated to provide user-friendly interface to work with various aspects of glossary, including:

* create glossaries, terms and categories
* create various relationships between terms - like synonymns, antonymns, seeAlso
* organize categories in hierarchies
* assign terms to entities
* search for entities using associated terms

Most of glossary related UI can be found under a new tab named GLOSSARY, which is present right next to existing
familiar tabs SEARCH and CLASSIFICATION.

#### **Glossary tab**

Apache Atlas UI provides two ways to work with a glossary - term view and category view.

Term view allows an user to perform the following operations:

* create, update and delete terms
* add, remove and update classifications associated with a term
* add, remove and update categorization of a term
* create various relationships between terms
* view entities associated with a term

Category view allows an user to perform the following operations:

* create, update and delete categories and sub-categories
* associate terms to categories

Users can switch between term view and category view using toggle provided in GLOSSARY tab.

82 83 84 85
<Img src={`/images/markdown/terms_view.png`}  width="300px" />

<Img src={`/images/markdown/category_view_1.png`}  width="300px" />

86 87 88

##### Term context menu

89
* Create a new term
90 91 92
Clicking on the **ellipsis (...)** next to a glossary name shows a pop-over menu that allows users to create a term in
the glossary or delete the glossary - as shown below.

93
<Img src={`/images/markdown/term_view_context.png`}  width="360px" />
94 95


96
* To delete a term
97 98 99
Clicking on the **ellipsis (...)** next to a term name shows a pop-over menu that allows users to delete the term - as
shown below.

100
<Img src={`/images/markdown/term_delete_context.png`} width="600px" />
101 102 103 104 105 106 107 108 109 110


##### Term detail page
Various details of a term can be viewed by clicking on the term name in the glossary UI. Each tabs under the details
page provides different details of the term.

* Entities tab shows the entities that are assigned to the selected term
* Classifications tab shows the classification(s) associated with the selected term
* Related terms tab shows the terms that are related to the selected term

111
<Img src={`/images/markdown/term_details.png`} />
112 113 114 115 116 117


##### Add classification to Term

Clicking on **+** next to classification label to add a classification to the term.

118 119 120 121 122
<Img src={`/images/markdown/term_add_classification_1.png`} alt="Add classification"  width="400px" />

<Img src={`/images/markdown/term_add_classification_2.png`} alt="Add classification - details"  width="400px" />

<Img src={`/images/markdown/term_with_classification.png`} alt="Classifications associated with term"  width="400px" />
123 124 125 126 127


##### Create term relationship with other term
Click on "Related Terms" tab when viewing term details. Clicking on **+** will allow linking a term with the current term.

128
<Img src={`/images/markdown/terms_related_terms.png`} />
129 130 131 132 133 134


##### Categorize a term

Click on **+** next to categories label to categorize a term. A modal dialog will be presented for choosing a category.

135
<Img src={`/images/markdown/term_add_category.png`}  width="400px" />
136 137 138 139


#### **Category view**

140
When the toggle switch is on category, the panel will list down all glossaries along-with the category hierarchy. Here's a list of possible
141 142
interactions under this view.

143 144 145
* Expanded view
<Img src={`/images/markdown/category_view_2.png`}  width="300px" />

146 147 148 149 150

##### Category context menu

Clicking on **ellipsis (...)** next to the category name will present a category context menu.

151
* To create a new category
152

153
<Img src={`/images/markdown/category_view_glossary_context.png`}  width="600px" />
154

155
* To create a sub-category or delete a category
156

157
<Img src={`/images/markdown/category_view_category_context_1.png`}  width="600px" />
158 159 160 161 162 163


##### Category detail page

Once a category is selected, the details will be presented in the right pane.

164
<Img src={`/images/markdown/category_details_with_terms.png`}  width="600px" />
165 166 167 168 169 170


##### Categorize term

Click on **+** next to the terms label to link a term under selected category.

171 172 173 174 175 176
<Img src={`/images/markdown/category_add_term.png`}  width="600px" />

<Img src={`/images/markdown/category_add_term_1.png`}  width="400px" />

<Img src={`/images/markdown/category_add_term_2.png`}  width="400px" />

177 178 179

#### **Term assignment flow**

180 181
Terms can be assigned to an entity either from the results page or entity details page.

182 183 184 185
##### Assign term

Click on **+** under "terms" column (if associating term from search page)

186
<Img src={`/images/markdown/entity_search_add_term.png`} />
187 188 189 190


Click on **+** next to "terms" label (if viewing a specific entity details)

191
<Img src={`/images/markdown/entity_details_add_term.png`} />
192 193


194
Both the actions will present the following modal, follow prompts on screen to complete term assignment.
195

196
<Img src={`/images/markdown/entity_add_term_modal.png`}  width="400px" />
197 198 199 200 201 202


##### Propagated classification

If a term has classification then the entity is has been assigned inherits the same.

203 204 205
<Img src={`/images/markdown/term_details_with_classification.png`} />

<Img src={`/images/markdown/entity_assigned_term_with_tag.png`}  width="600px" />
206 207


208
#### **Search using a term**
209 210

Apache Atlas basic-search API and UI have been updated to support term as a search criteria. This allows users to find
211
entities associated with a given term. Basic search UI now includes a new input drop-down for term based searches.
212

213
<Img src={`/images/markdown/term_search.png`}  width="300px" />
214 215 216 217 218 219 220 221 222 223


***
#### Summary of REST interactions

Following operations are supported by Atlas, the details of REST interface can be found [here](api/v2/index.html)

##### JSON structure

* Glossary
224

225 226
<SyntaxHighlighter wrapLines={true} language="json" style={theme.dark}>
{`{
227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266
	"guid": "2f341934-f18c-48b3-aa12-eaa0a2bfce85",
	"qualifiedName": "SampleBank",
	"displayName": "Banking",
	"shortDescription": "Glossary of bank",
	"longDescription": "Glossary of bank - long description",
	"language": "English",
	"usage": "N/A",
	"terms": [
	{
		"termGuid": "502d34f1-b85f-4ad9-9d9f-fe7020ff0acb",
		"relationGuid": "6bb803e4-3af6-4924-aad6-6ad9f95ecd14",
		"displayText": "A savings account"
	}, {
		"termGuid": "e441a540-ee55-4fc8-8eaf-4b9943d8929c",
		"relationGuid": "dbc46795-76ff-4f68-9043-be0eff0bc0f3",
		"displayText": "15-30 yr mortgage"
	}, {
		"termGuid": "998e3692-51a8-47fe-b3a0-0d9f794437eb",
		"relationGuid": "0dcd31b9-a81c-4185-ad4b-9209a97c305b",
		"displayText": "A checking account"
	}, {
		"termGuid": "c4e2b956-2589-4648-8596-240d3bea5e44",
		"relationGuid": "e71c4a5d-694b-47a5-a41e-126ade857279",
		"displayText": "ARM loans"
	}],
	"categories": [{
		"categoryGuid": "dd94859e-7453-4bc9-b634-a17fc14590f8",
		"parentCategoryGuid": "e6a3df1f-5670-4f9e-84da-91f77d008ce3",
		"relationGuid": "a0b7da02-1ccd-4415-bc54-3d0cdb8857e7",
		"displayText": "Accounts"
	}, {
		"categoryGuid": "e6a3df1f-5670-4f9e-84da-91f77d008ce3",
		"relationGuid": "0e84a358-a4aa-4bd3-b806-497a6962ae1d",
		"displayText": "Customer"
	}, {
		"categoryGuid": "7f041401-de8c-443f-a3b7-7bf5a910ff6f",
		"parentCategoryGuid": "e6a3df1f-5670-4f9e-84da-91f77d008ce3",
		"relationGuid": "7757b031-4e25-43a8-bf77-946f7f06c67a",
		"displayText": "Loans"
	}]
267 268
}`}
</SyntaxHighlighter>
269 270

* Term
271

272 273
<SyntaxHighlighter wrapLines={true} language="json" style={theme.dark}>
{`{
274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303
	"guid": "e441a540-ee55-4fc8-8eaf-4b9943d8929c",
	"qualifiedName": "fixed_mtg@SampleBank",
	"displayName": "15-30 yr mortgage",
	"shortDescription": "Short description",
	"longDescription": "Long description",
	"examples": ["N/A"],
	"abbreviation": "FMTG",
	"anchor": {
		"glossaryGuid": "2f341934-f18c-48b3-aa12-eaa0a2bfce85",
		"relationGuid": "dbc46795-76ff-4f68-9043-be0eff0bc0f3"
	},
	"categories": [{
		"categoryGuid": "7f041401-de8c-443f-a3b7-7bf5a910ff6f",
		"relationGuid": "b4cddd33-7b0c-41e2-9324-afe549ec6ada",
		"displayText": "Loans"
	}],
    "seeAlso"           : [],
    "synonyms"          : [],
    "antonyms"          : [],
    "replacedBy"        : [],
    "replacementTerms"  : [],
    "translationTerms"  : [],
    "translatedTerms"   : [],
    "isA"               : [],
    "classifies"        : [],
    "preferredTerms"    : [],
    "preferredToTerms": [ {
                           "termGuid"   : "c4e2b956-2589-4648-8596-240d3bea5e44",
                           "displayText": "ARM Loans"
                         }]
304 305
}`}
</SyntaxHighlighter>
306 307

* Category
308

309 310
<SyntaxHighlighter wrapLines={true} language="json" style={theme.dark}>
{`{
311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332
	"guid": "7f041401-de8c-443f-a3b7-7bf5a910ff6f",
	"qualifiedName": "Loans.Customer@HortoniaBank",
	"displayName": "Loans",
	"shortDescription": "Loan categorization",
	"anchor": {
		"glossaryGuid": "2f341934-f18c-48b3-aa12-eaa0a2bfce85",
		"relationGuid": "7757b031-4e25-43a8-bf77-946f7f06c67a"
	},
	"parentCategory": {
		"categoryGuid": "e6a3df1f-5670-4f9e-84da-91f77d008ce3",
		"relationGuid": "8a0a8e11-0bb5-483b-b7d6-cfe0b1d55ef6"
	},
	"childrenCategories" : [],
	"terms": [{
		"termGuid": "e441a540-ee55-4fc8-8eaf-4b9943d8929c",
		"relationGuid": "b4cddd33-7b0c-41e2-9324-afe549ec6ada",
		"displayText": "15-30 yr mortgage"
	}, {
		"termGuid": "c4e2b956-2589-4648-8596-240d3bea5e44",
		"relationGuid": "8db1e784-4f04-4eda-9a58-6c9535a95451",
		"displayText": "ARM loans"
	}]
333 334
}`}
</SyntaxHighlighter>
335 336 337 338 339 340 341 342 343 344 345

##### CREATE operations

1. Create a glossary
2. Create a term
3. Create a categorized term
4. Create term with relations
5. Create a category
6. Create a category with hierarchy
7. Create category and categorize term(s)
8. Assign term to entities
346

347 348 349 350 351 352 353 354 355 356 357 358 359 360 361
**NOTE:**

* During create operations glossary, term and category get an auto assigned GUID and qualifiedName.
* To create a category with children, the children MUST be created beforehand.
* To create a term belonging to a category, the category MUST be created beforehand.
* To create term with relations, related term(s) MUST be created beforehand.

***

##### READ operations

1. Get glossary by GUID - Gives all terms and categories (headers) belonging to the glossary.
2. Get all Glossaries - Gives all glossaries with terms and categories (headers) belonging to the respective glossary.
3. Get a term by GUID - Gives details about the term, categories it belongs to (if any) and any related term(s).
4. Get a category by GUID - Gives details about the category, category hierarchy (if any) and term(s) belonging to the category.
362
5. Get all terms of a given glossary - Gives all terms (with details as mentioned in #3) belonging to given glossary.
363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379
6. Get all categories of a given glossary - Gives all categories (with details as mentioned in #4) belonging to given glossary.
7. Get all terms related to given term - Gives all terms related/linked to the given term.
8. Get all categories related to a given category (parent and children)
9. Get all terms for a given category

***

##### UPDATE operations

1. Partial update of glossary
2. Partial update of term
3. Partial update of category
4. Update a given glossary
5. Update a given term
6. Update a given category

**NOTE:**
380 381

* Partial update only deals with the **_primitive attributes_** defined in the Glossary model file.
382 383 384 385
* GUID and qualifiedName can't be changed once assigned. Only way to this is to delete and recreate the required object.
* Anchors **can't** be removed in any updates
* Update APIs expect the JSON to be modified **in-place** after the **GET** call. Any **_missing_** attributes/relations will be **_deleted_**.
* Any update to category's hierarchy leads to a cascaded update of the hierarchy under it e.g. anchor change would affect all children,
386
   parent change would affect the qualifiedName of self and children.
387 388 389 390 391 392 393 394

***
##### DELETE operations

1. Delete glossary - Also deletes all categories and terms anchored to given glossary. This delete is **_blocked_** if any term has been **_assigned_** to an entity.
2. Delete term - Only deletes the term **_if_** it's not associated/assigned to any entity.
3. Delete category - **_Only_** deletes the given category, all children become top-level categories.
4. Remove term assignment from entity