Reply
New Contributor
Posts: 5
Registered: ‎07-18-2016

Cloudera Navigator - Getting distinct values for field

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

New Contributor
Posts: 5
Registered: ‎10-04-2016

Re: Cloudera Navigator - Getting distinct values for field

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

New Contributor
Posts: 5
Registered: ‎07-18-2016

Re: Cloudera Navigator - Getting distinct values for field

What do you mean by API ..which API ?

New Contributor
Posts: 5
Registered: ‎11-21-2016

Re: Cloudera Navigator - Getting distinct values for field

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.

Announcements
New solutions