You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Is it possible to pass query parameters in a SQL query? #7776
Activity
alamb commentedon Oct 10, 2023
hi @shner-elmo -- yes you can do this with
PREPAREstatements:Here are some examples:
https://github.com/apache/arrow-datafusion/blob/b6f87edbbaaaedd696b2e448fcd7df7ad3cd2c93/datafusion/sqllogictest/test_files/prepare.slt#L18-L20
You can do it via a
DataFramelike this:https://docs.rs/datafusion/latest/datafusion/dataframe/struct.DataFrame.html#method.with_param_values
Something like
This is something that should be documented. I will try and do so
alamb commentedon Oct 10, 2023
PR with documentation: #7785
alamb commentedon Oct 10, 2023
(there are some rough edges around the usability that I fixed in #7785)