Simulation Aids: IN operator with view() expression

Is it possible to use the SQL IN operator with view()?

SELECT * WHERE column_val IN ('str1','str2','str3')

Ideally I'd like to pass this as an argument:

SELECT * WHERE column_val IN args[0]
args[0] = "('str1',str2','str3')"

Figured it out, 'in' cannot be capitalized:

view(
SELECT * WHERE column_val in args[0],
{dataset_tag},
("'str1','str2'")
)
1 Like

The reason it cannot be capitalized is that it is not the SQL "IN" operator, but the python "in" operator. Expressions in my PseudoSQL are python. Particularly important for "equals" comparisons.

1 Like

Thanks for clarifying, I've found the module is incredibly useful for reducing the number of large polling queries made against a database that just requires small filter differences.