I am trying to write a simple connector function that writes to a table that has an enum field. I am trying to pass the variable through as a text variable with the exact text of one of the enum options but I am getting the following error:
SQL Test Error
Error: [500] error: column “event” is of type event_station_enum but expression is of type text
I don’t think that works. I am able to create a function that passes the exact the text through but I want to make one connector function that passes all text
This is what I tried
INSERT into tabla
(created_at,updated_at,event,service_id,station_id,user_id)
VALUES(now(),now(),$event$::enum_log_priority, $service_id$, $station_id$, $user_id$)