I have a dashboard with a boolean filter is_participant_in_watchlist
I am using the field as a dashboard filter for all charts.
When the filter is applied to the charts, the boolean filter’s values becomes 0 and 1.
This caused the below error
Error: Flight returned invalid argument error, with message: Values passed to IN operator must have compatible types
startLine 7
startColumn 7
endLine 8
endColumn 40
SQL Query SELECT DATE_TRUNC('day', as_of_date) AS as_of_date,
sehk_code AS sehk_code,
participant_id AS participant_id,
max(shareholding_amount) AS "MAX(shareholding_amount)"
FROM "l1-hk-trading"."flat"."flat_hk_stock_shareholding_history"
WHERE sehk_code IN ('00001')
AND is_participant_in_watchlist IN (0,
1)
AND as_of_date >= TO_DATE('2024-01-01', 'YYYY-MM-DD')
AND as_of_date < TO_DATE('2024-05-15', 'YYYY-MM-DD')
GROUP BY DATE_TRUNC('day', as_of_date),
sehk_code,
participant_id
ORDER BY "MAX(shareholding_amount)" DESC
LIMIT 10000
==========
Screenshots
- Boolean filter NOT applied
- Boolean filter applied
=========
My current workaround is to convery my boolean fields to 0 or 1 just for dashboarding purposes on superset