Limiting a row set defined by a prefix

32 views
Skip to first unread message

Andrei Balici

unread,
Sep 15, 2021, 2:35:54 PM9/15/21
to Google Cloud Bigtable Discuss

I was trying to do this in Python: I have multiple prefixes, but I only want the first result of each row set defined by a prefix. In essence, applying a limit of 1 for each row set, not for the entire scan.

Imagine you have the following records' row keys:

collection_1#item1#reversed_timestamp1
collection_1#item1#reversed_timestamp2
collection_1#item2#reversed_timestamp3
collection_1#item2#reversed_timestamp4

What if I want to retrieve just the latest entries for collection_1#item1# and collection_1#item2# at the same time?

Can this be done?
Thanks!
Reply all
Reply to author
Forward
0 new messages