This message was deleted.
# troubleshooting
s
This message was deleted.
a
can you share the full query?
a
@cactus - yep, a full query will be good. In general, you can ingest boolean fields as either a string or long type as there’s no real boolean data type in Druid. If you’re using an extern function in your SQL query, the types should be specified in the row signature as documented here
c
Aha I've noticed on the ingestion spec that boolean isn't actually listed as a viable choice. I'd added given a type spec containing "bool"
Presumably you'd have to convert the type to a boolean in the SELECT statement similar to how
__time
is generated?
a
ah, if you want the query to return bool type, I think you could use the
CASE
statement, something like:
Copy code
CASE WHEN some_boolean_property = 'true' THEN TRUE ELSE FALSE
Not sure if a Druid function/expression at query time would do the same
c
Having loaded the value as a
long
, I had no further issues. Many thanks for this 🙂
👍 1