python - Get only the first 10 columns of a row using happybase -
is possible limited number of columns column family row? lets want fetch first 10 values ['cf1': 'col1']
particular row.
this same question https://github.com/wbolster/happybase/issues/93
the answer is:
i think way scan server side filter. think 1 you're after columncountgetfilter:
columncountgetfilter - takes 1 argument, limit. returns first limit number of columns in table. syntax: columncountgetfilter (‘’) example: columncountgetfilter (4)
with happybase (untested):
for row_key, data in table.scan(columns=['cf1'], filter='columncountgetfilter(10)'): print(row_key, data)
Comments
Post a Comment