Is there a way to get only a particular bin of a record in Python client?

Hi,

Is there a way to get only a specified bin for a record in Python client?

import aerospike

key = ('namespace', 'set', 'primary_key')
key, meta, bins = client.get(key)

client.get has an optional parameter for read policy, but I couldn’t find a way to specify a bin value in it.

My records are a bit bulky and in order to read only one specific bin, it would be quite inconvinient to read the entire record.

Let me know.

Thanks!

aerospike.select( key, bins: list[, policy: dict]) -> (key, meta, bins )

Read a record with a given key , and return the record as a tuple consisting of key , meta and bins , with the specified bins projected.

https://aerospike-python-client.readthedocs.io/en/latest/client.html#record-operations

Thanks @pgupta,

So, aerospike.select seems to be the solution. I was trying to make it work with aerospike.get.

Thanks!

This topic was automatically closed 84 days after the last reply. New replies are no longer allowed.