Combining multiple operations¶
For most of the write operations covered in the sections above, there is also an approach you can use to combine multiple operations together.
Optimizes changes to a single asset
This is useful when you have many changes to make to an asset. Rather than making a separate API call for each change, with this approach you can make a single API call and include all the information within it.
For example, to create a term complete with a description, parent category, announcement, certificate, several owners, and several linked assets:
Combine multiple operations | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
|
- Use the
creator()
method to initialize the object with all necessary attributes for creating it. For a term, this is a name and the GUID of the glossary in which to create the term. (The finalnull
is for aqualifiedName
of the glossary, which could be used instead of the GUID.) - Set a description for the term.
- Add a category for the term. (This category must already exist, or be created before this operation.)
- (Optional) You can specify whether this category should be
APPEND
ed to any categories the term is already organized within, orREMOVE
d from the existing set of categories. If this argument is left out, the entire set of categories the term is linked to will beREPLACE
d. - Set the announcement that should be added (in this example, we're using
INFORMATION
). - Add a title for the announcement.
- Add a message for the announcement.
- Set the certificate for the term (in this example, we're using
VERIFIED
). - Add a message for the certificate.
- Add an owner.
- Add another owner. Note that we can just continue chaining single owners, we do not need to create our own list first.
- Call the
build()
method to build the enriched object. - Call the
save()
method to actually create the term with all of these initial details. Because this operation will persist the asset in Atlan, you must provide it anAtlanClient
through which to connect to the tenant. - The response will include that single term that was created.
- The response will also include any related objects (the category) that were updated by this term being related to them.
Combine multiple operations | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
|
- Use the
creator()
method to initialize the object with all necessary attributes for creating it. For a term, this is a name and the GUID of the glossary in which to create the term. - Set a description for the term.
- Add the categories for the term. (This parameter is a list and the categories must already exist, or be created before this operation.).
- (Optional) You can specify whether this category should be
APPEND
ed to any categories the term is already organized within, orREMOVE
d from the existing set of categories. If this argument is left out, the entire set of categories the term is linked to will beREPLACE
d. - Create the announcement.
- Set the announcement that should be added (in this example, we're using
INFORMATION
). - Add a title for the announcement.
- Add a message for the announcement.
- Set the announcement for the term.
- Set the certificate for the term (in this example, we're using
VERIFIED
). - Add a message for the certificate.
- Add the owners. This parameter is a set of strings.
- Call the
save()
method to actually create the term with all of these initial details. - The response will include that single term that was created.
- The response will include that single glossary that was updated.
- The response will include that single category that was updated.
Combine multiple operations | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
|
- Use the
creator()
method to initialize the object with all necessary attributes for creating it. For a term, this is a name and the GUID of the glossary in which to create the term. (The finalnull
is for aqualifiedName
of the glossary, which could be used instead of the GUID.) - Set a description for the term.
- Add a category for the term. (This category must already exist, or be created before this operation.)
- (Optional) You can specify whether this category should be
APPEND
ed to any categories the term is already organized within, orREMOVE
d from the existing set of categories. If this argument is left out, the entire set of categories the term is linked to will beREPLACE
d. - Set the announcement that should be added (in this example, we're using
INFORMATION
). - Add a title for the announcement.
- Add a message for the announcement.
- Set the certificate for the term (in this example, we're using
VERIFIED
). - Add a message for the certificate.
- Add an owner.
- Add another owner. Note that we can just continue chaining single owners, we do not need to create our own list first.
- Call the
build()
method to build the enriched object. - Call the
save()
method to actually create the term with all of these initial details. Because this operation will persist the asset in Atlan, you must provide it anAtlanClient
through which to connect to the tenant. - The response will include that single term that was created.
- The response will also include any related objects (the category) that were updated by this term being related to them.
POST /api/meta/entity/bulk | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
|
- All details must still be included in an outer
entities
array. - You need to specify the type for each asset you are updating.
- You need to specify other required attributes for each asset, such as its name and qualifiedName. (And in the case of terms and categories, also the parent glossary they exist within.)
- Set a description for the term.
- Set the announcement that should be added.
- Add a title for the announcement.
- Add a message for the announcement.
- Set the certificate for the term (in this example, we're using
VERIFIED
). - Add a message for the certificate.
- Add multiple owners.
- Add one or more categories for the term. (Each category must already exist, or be created before this operation.) When you want the relationship to be appended, you must specify it within the
appendRelationshipAttributes
portion of the payload. If it is within theattributes
portion of the payload, it will replace all such relationships on the asset.
What are the available enrichments?
The list of methods that are available to enrich each type of asset in Atlan should be directly visible to you within your favorite IDE (when using one of the SDKs).