Creating a hierarchy¶
Categories in a glossary can be organized within another category, to create a hierarchy of categories.
To do this, you need to create the upper levels of the hierarchy before the lower levels. Each level you create should refer to its parent, and therefore its parent must first exist.
Create a root-level category¶
To create a root- or top-level category (no parent):
Create a top-level category | |
---|---|
1 2 3 4 5 |
|
- A name for the new category.
- The glossary in which to create the category. Note that we do not specify any parent category anywhere, since this will be a top-level category.
- You need to build the object you've just defined.
- You then only need to
save()
1 the object to create it in Atlan.
Create a top-level category | |
---|---|
1 2 3 4 5 6 7 8 9 |
|
- A name for the new category.
- The glossary in which to create the category. Note that we do not specify any parent category anywhere, since this will be a top-level category.
- You then only need to
save()
1 the object to create it in Atlan.
Create a top-level category | |
---|---|
1 2 3 4 5 |
|
- A name for the new category.
- The glossary in which to create the category. Note that we do not specify any parent category anywhere, since this will be a top-level category.
- You need to build the object you've just defined.
- You then only need to
save()
1 the object to create it in Atlan.
POST /api/meta/entity/bulk | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
|
- All assets must be wrapped in an
entities
array. - You must provide the exact type name for the category (case-sensitive), which for a category is
AtlasGlossaryCategory
. - You must provide the exact name of the category (case-sensitive).
- You must provide the exact name of the category (case-sensitive) as you want it to appear in the UI.
- You must provide an
anchor
relationship. - Within the
anchor
relationship you must provide the exact type name for a glossary:AtlasGlossary
. - Within the
anchor
relationship you must provide the GUID of the glossary the category should be created within.
Create a child category¶
Parent must exist before creating the child
Remember: the parent category must exist before you create the child category.
To create a child category, the steps are very similar but you add in the reference to the parent category:
Create a child category | |
---|---|
6 7 8 9 10 11 |
|
- A name for the new category.
- The glossary in which to create the category.
-
Now you add in the reference to the parent category. There are multiple ways you can reference the category:
- If you have the parent category already, you can use
trimToReference()
to obtain the minimal reference to it. - If you only know the GUID, you can use
GlossaryCategory.refByGuid()
to create a minimal reference to it. - If you only know the qualifiedName, you can use
GlossaryCategory.refByQualifiedName()
to create a minimal reference to it.
- If you have the parent category already, you can use
-
You need to build the object you've just defined.
- You then only need to
save()
1 the object to create it in Atlan.
Create a child category | |
---|---|
10 11 12 13 14 15 16 17 18 |
|
- A name for the new category.
- The glossary in which to create the category.
-
Now you add in the reference to the parent category. There are multiple ways you can reference the category:
- If you have the parent category already, you can send it through as-is.
- If you only know the GUID, you can use
AtlasGlossaryCategory.ref_by_guid()
to create a minimal reference to it. - If you only know the qualifiedName, you can use
GlossaryCategory.ref_by_qualified_name()
to create a minimal reference to it.
-
You then only need to
save()
1 the object to create it in Atlan.
Create a child category | |
---|---|
6 7 8 9 10 11 |
|
- A name for the new category.
- The glossary in which to create the category.
-
Now you add in the reference to the parent category. There are multiple ways you can reference the category:
- If you have the parent category already, you can use
trimToReference()
to obtain the minimal reference to it. - If you only know the GUID, you can use
GlossaryCategory.refByGuid()
to create a minimal reference to it. - If you only know the qualifiedName, you can use
GlossaryCategory.refByQualifiedName()
to create a minimal reference to it.
- If you have the parent category already, you can use
-
You need to build the object you've just defined.
- You then only need to
save()
1 the object to create it in Atlan.
POST /api/meta/entity/bulk | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
|
- All assets must be wrapped in an
entities
array. - You must provide the exact type name for the category (case-sensitive), which for a category is
AtlasGlossaryCategory
. - You must provide the exact name of the category (case-sensitive).
- You must provide the exact name of the category (case-sensitive) as you want it to appear in the UI.
- You must provide an
anchor
relationship. - Within the
anchor
relationship you must provide the exact type name for a glossary:AtlasGlossary
. - Within the
anchor
relationship you must provide the GUID of the glossary the category should be created within. - You must provide a
parentCategory
relationship to define the parent category. - Within the
parentCategory
relationship you must provide the exact type name for a category:AtlasGlossaryCategory
. - Within the
parentCategory
relationship you must provide the GUID of the category this category should be organized within.