Enum with connector function

Hola Tulip Community!!

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

Does anyone know any workarounds here?

Hey @sarah -

Have you explicitly cast the connector input to an enum like in this guide?


I have had to this in the past when writing text to datetimetz fields in SQL databases:

insert into schema.table (human_id,session_date)

Let me know if this doesn’t work and I can throw together a table to do some more testing on my end.


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
VALUES(now(),now(),$event$::enum_log_priority, $service_id$, $station_id$, $user_id$)