Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Do traits still use the legacy API?

Solved Go to solution
Highlighted

Do traits still use the legacy API?

Contributor

I'm looking at the documentation for HDP 2.6.1 and from what I can see, traits still use the legacy API rather than v2. Am I reading the documentation correctly?

In section 'Atlas types' it states that composite metatypes are "Class, Struct, Trait".

e.g.

POST v2/types/classificationdef 

POST /v2/types/structdef 

But v2 REST API doesn't have anything for 'trait'

In section 'Cataloging Atlas Metadata: Traits and Business Taxonomy' we have:

POST http://<atlas-server-host:port>/api/atlas/types

So this is using the legacy API. Is this right? Will this change with future Atlas releases?

Also, can someone provide a business use case for using classifications, structs and traits. I'm getting muddled between the circumstances I would use each. Many thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: Do traits still use the legacy API?

Expert Contributor

Hi @Laura Ngo,

The documentation for 'Atlas types' is still not updated with v2 types. It should ideally be - "Composite metatypes – Entity, Struct and Classification"

Struct Type:

You cannot create instances for Struct types as they do not have an identity of their own (it doesn't have a GUID), it always exists with an entity. e.g. entity attribute can be of type struct.

Classification type:

Each classification instance is associated with an entity. The v2 type name for "trait" is "classification" and it is derived from Struct. e.g. Associate tag/classification to an entity.

Checkout Working with Atlas Tags to know more about how you can assign tag/classification to an entity.

View solution in original post

1 REPLY 1
Highlighted

Re: Do traits still use the legacy API?

Expert Contributor

Hi @Laura Ngo,

The documentation for 'Atlas types' is still not updated with v2 types. It should ideally be - "Composite metatypes – Entity, Struct and Classification"

Struct Type:

You cannot create instances for Struct types as they do not have an identity of their own (it doesn't have a GUID), it always exists with an entity. e.g. entity attribute can be of type struct.

Classification type:

Each classification instance is associated with an entity. The v2 type name for "trait" is "classification" and it is derived from Struct. e.g. Associate tag/classification to an entity.

Checkout Working with Atlas Tags to know more about how you can assign tag/classification to an entity.

View solution in original post

Don't have an account?
Coming from Hortonworks? Activate your account here