Skip to main content

Creating glossary objects

You can create objects in glossaries in the same way as all other objects in the SDK. Each object provides a method that takes the minimal set of required fields to create that asset.

Create glossary

To create a glossary:

Create a glossary
Glossary glossary = Glossary
.creator("Example Glossary") // (1)
.assetIcon(AtlanIcon.BOOK_OPEN_TEXT) // (2)
.build(); // (3)
AssetMutationResponse response = glossary.save(client); // (4)
  1. A name for the new glossary.
  2. You can chain any other enrichment onto the creator, such as an icon for the glossary in this example.
  3. You then build the object (in-memory).
  4. And finally you can save the glossary back to Atlan (and the result of that save is returned). Because this operation will persist the asset in Atlan, you must provide it an AtlanClient through which to connect to the tenant.

Create category

To create a category:

Create a category
GlossaryCategory category = GlossaryCategory
.creator("Example Category", // (1)
"b4113341-251b-4adc-81fb-2420501c30e6") // (2)
.build(); // (3)
AssetMutationResponse response = category.save(client); // (4)
  1. You must provide a name for the new category.
  2. You must provide the ID of the glossary in which the category should be created (GUID or qualifiedName).
  3. You then build the object (in-memory).
  4. And finally you can save the category back to Atlan (and the result of that save is returned). Because this operation will persist the asset in Atlan, you must provide it an AtlanClient through which to connect to the tenant.

Create term

To create a term:

Create a term
GlossaryTerm term = GlossaryTerm
.creator("Example Term", // (1)
"b4113341-251b-4adc-81fb-2420501c30e6") // (2)
.build(); // (3)
AssetMutationResponse response = term.save(client); // (4)
  1. You must provide a name for the new term.
  2. You must provide the ID of the glossary in which the term should be created (GUID or qualifiedName).
  3. You then build the object (in-memory).
  4. And finally you can save the term back to Atlan (and the result of that save is returned). Because this operation will persist the asset in Atlan, you must provide it an AtlanClient through which to connect to the tenant.
Was this page helpful?