Looking to retrieve unique values example

https://www.aerospike.com/docs/guide/examples/unique_function.html ← discusses unique function and how to use it. However it’s lacking a full example of where does it fit in the chain. Is this for stream UDF? or record UDF? If it’s for stream, where does it FIT? Is there a way to do unique retrieval of non primary key using regular client.query without UDF?

LSET has been deprecated and that page describes a way to override the default handling to create a hash when inserting an object into a LDT (large list), since each object needs to be uniquely identified but they aren’t full records with a key.

Or are you talking about the finding unique values amongst the bins of multiple records, similar to SELECT DISTINCT SomeColumn FROM SomeTable in SQL?

In that case you would need to write a Stream UDF to perform a unique count aggregation.

Okay, Stream UDF sounds like it’s the way to go.