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


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! 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.

Thanks @pgupta,

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


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