Filter optional

I have a filter that i want to be optional but when i don't input anything it outputs everything.

select payment_gateway_names::text from orders_order where payment_gateway_names::text LIKE '%' || {{payment_gateway_names}} || '%';

in postgresql.

when i input a text it works but not when empty. I get : Unable to execute the request: required parameters missing: #{"payment_gateway_names"}

Hi @louisc, check https://www.metabase.com/learn/sql-questions/sql-variables.html