Convert column to bitmap/HLL during kafka routine loading to StarRocks

108 Views Asked by At

I intend to do count distinct in SR, and noticed columns can be converted to bitmap or HLL during loading. But I only find the transformation during stream load and broker load, is there any way to covert bitmap or HLL during kafka routine load?

1

There are 1 best solutions below

0
Allen Li On BEST ANSWER
CREATE ROUTINE LOAD example_tbl1_ordertest1 ON example_tbl1
COLUMNS (c1, c2, temp, c3=to_bitmap(c3))

FROM KAFKA
(
    "kafka_broker_list" ="<kafka_broker1_ip>:<kafka_broker1_port>",
    "kafka_topic" = "ordertest1",
    "kafka_partitions" ="0,1,2,3,4",
    "property.kafka_default_offsets" = "OFFSET_BEGINNING"
);