I have a table in my app that returns/displays one record during each run. I would like to essentially case on a column value on the selected record, and depending on what the value is, call a stored procedure from snowflake.
something like
CASE
WHEN {{table.selectedRow.column1.value}} = 'A'
THEN
CALL SCHEMA.PROCEDURE_1( {{table.selectedRow.column1.value}} )
WHEN {{table.selectedRow.column1.value}} = 'B'
THEN
CALL SCHEMA.PROCEDURE_2( {{table.selectedRow.column1.value}}
and so on. Is there a way to set something like this up? Since I wouldn't be able to just run a CASE sql statement on its own.
More specifically this is my table, when I click the update eligibility button in the table for the record, I would like it to run something where it checks value of ISO Country field, then checks whether that value is equal to a specific country and run the stored procedure for that country. Not sure whether this can be done in sql mode or something else?