With parameters you can inject data into your SQL statement. You can input plain text / numbers or inject data from Sheets or another block.
Add a parameter to your SQL
select e.*
from dummy.events AS e
where 1=1
and e.email like '%{{email}}%'
limit 200
As soon as you add a parameter to your SQL, you'll see a "Params" section show up in SeekWell, select Sheets as the Type
Sheet1!A1
). You can only use a single cell (except Postgres and Snowflake, see below). If you need to reference multiple cells, use and
/ or
statements.Select "Block" as the parameter type
You can also use a Sheet range (i.e. more than one cell) to generate a SQL list (e.g. where some_column in (1, 2, 3)
). To use the list in your query, simply add the parameter (no parens, quotes, etc. needed), for example:
select *
from some_table as d
where d.some_column in {{vals}}