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.

Cloudera Navigator - Getting distinct values for field

Cloudera Navigator - Getting distinct values for field

New Contributor

I am building an application on top of navigator, wanted to find distinct/unique values for field in properties. Lets say i have added custom property to all my entities - property being key value pair - field name - "Location" and this will have values such as 'london', 'New York', 'Bangalore', now i want to know all distinct values for the field - 'Location'. How to get it using Cloudera Navigator's REST Api support

3 REPLIES 3

Re: Cloudera Navigator - Getting distinct values for field

Explorer

Using the API, did u check if it has a unique function.

Re: Cloudera Navigator - Getting distinct values for field

New Contributor

What do you mean by API ..which API ?

Re: Cloudera Navigator - Getting distinct values for field

New Contributor

Have you tried using facets? E.g. something like this should generate the facet values for a custom prop named test:

 

    /api/v9/interactive/entities?query=up_test:*&facetFields=up_test&limit=0

 

Not sure how it behaves if you have a lot of unique values for the property...probably just returns the most frequently used ones.

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