How to use HLLSketch in jdbc?

How to use HLLSketch in jdbc?

useApproximateCountDistinct=true is not working.

I got error like this

“expected a HyperUnique, got a class”


Hey Jay,

Try APPROX_COUNT_DISTINCT_DS_HLL instead. (See for reference)

Hi Gian.

I’m using tableau via jdbc now so I can’t modify distinct count query.

Only option I can do is set useApproximateCountDistinct=true in jdbc setting.

How can I use hllsketch in tableau? (hyperUnique is works well)


Hi Jay,

You can use “RAWSQLAGG_REAL” functions of Tableau.

Ex: to compute approx count distinct of customerID you can use expression RAWSQLAGG_REAL(“APPROX_COUNT_DISTINCT_DS_THETA(%1)”, [customerID])

Tableau supports variants of RAWSQL function - to compute agg metric or dimension (custom sql expression).

You can refer to post!topic/druid-user/DejxkN4Aiz4

Hope this helps.

Regards, Chari.