I am using Flink's Table API. I would like to use CASE WHEN
in a Table API query.
My query uses three fields: routeid, startlocation, distance
and I want to use a CASE WHEN
clause to identify factors based on the distance
value which are conditions required to satisfy based on routeid
.
Example:
SELECT
routeid,
startlocation,
CASE WHEN (routeid=1) AND (distance > 0 AND distance <= 250) THEN 'oneday-distance'
Is this possible with Flink's Table API? If yes, how can is be done?