How to apply multiple filter conditions like "col_a='some_value' AND col_b='some_another_value'" in Google Cloud Bigtable

20 Views Asked by At

I have created a chain filter like below:

Filters.Filter filter =
                    FILTERS
                            .condition(
                                    FILTERS
                                            .chain()
                                            .filter(FILTERS.family().exactMatch(columnFamily))
                                            .filter(FILTERS.qualifier().exactMatch("col_a"))
                                            .filter(FILTERS.value().exactMatch("value_a"))
                            )
                            .then(FILTERS.pass())
                            .otherwise(FILTERS.block());

But this is just for one condition like 'col_a=value_a'. How to use multiple filters to fetch data from Bigtable?

Chain Filters behave differently. They output only the matching cell. So, I had to apply "pass" and "block" filters in "then" and "otherwise" functions.

How can I add one more condition for another column qualifier and value?

0

There are 0 best solutions below