def filter_composing_condition(project_id, instance_id, table_id): client = bigtable.Client(project=project_id, admin=True) instance = client.instance(instance_id) table = instance.table(table_id) rows = table.read_rows(filter_=row_filters.ConditionalRowFilter( base_filter=row_filters.RowFilterChain(filters=[ row_filters.ColumnQualifierRegexFilter("data_plan_10gb"), row_filters.ValueRegexFilter("true") ]), true_filter=row_filters.ApplyLabelFilter(label="passed-filter"), false_filter=row_filters.ApplyLabelFilter(label="filtered-out"))) for row in rows: print_row(row)
def filter_modify_apply_label(project_id, instance_id, table_id): client = bigtable.Client(project=project_id, admin=True) instance = client.instance(instance_id) table = instance.table(table_id) rows = table.read_rows(filter_=row_filters.ApplyLabelFilter( label="labelled")) for row in rows: print_row(row)