UPDATE: This only happens with Google Cloud Bigtable Emulator, not with actual development or production BigTable instances (Google Cloud SDK 149.0.0)
I'm trying to do row filtering by Key regex filter, everything is working like a charm (filter by prefix, filter by key start and stop range, by key, by keys) but I can't get it working passing in the RowKeyRegexFilter
as filter, it just returns all the keys as an empty keys scan
:
# all the boilerplate to create a happybase connection skipped
t = connection.table("sometable")
t.put(
b'row1',
{
b"family1:col2": b".1",
b"family2:col2": b".12",
}
)
t.put(
b'row2',
{
b"family1:col2": b".2",
b"family2:col2": b".22",
}
)
t.put(
b'row3',
{
b"family1:col2": b".3",
b"family2:col2": b".32",
}
)
rows = t.scan(
filter=RowKeyRegexFilter(b'.+3')
)
print(len([i for i in rows])
That gives always 3
, no matter if you put (nomatchforsure)+
as regex, I could not find any documentation with a working example, and the most amazing thing is that google.cloud.happybase.table.Table.rows
performs a filter by row key always with RowKeyRegexFilter
, but passing regex into rows
method instead of real rows keys don't give regex filtering either, you can see it
Any help on this would be very appreciated