Is parameterized SQL not supported by Dremio?

With other mysql databases, something like this works:

import pyodbc
cnxn = pyodbc.connect('DRIVER={SQL Server};SERVER=localhost;DATABASE=testdb;UID=me;PWD=pass')

cursor = cnxn.cursor()

cursor.execute("""
    select user_id, user_name
      from users
     where last_logon < ?
       and bill_overdue = ?
""", [datetime.date(2001, 1, 1), 'y'])

(This is straight out of the pyodbc docs)

But after extensive tinkering try to get the dremio odbc to work I keep on getting an error: pyodbc.ProgrammingError: ('The SQL contains 0 parameter markers, but 2 parameters were supplied', 'HY000')
I’ve tried every formatting specified in PEP249 with no luck. I’ve tried pandas and removed it with no luck.

@kwcrook

Currently we do not support parameterized SQL

Thanks
@balaji.ramaswamy

Is this a limitation specific to ODBC, or does this apply to JDBC also?
@balaji.ramaswamy

@patricker

Currently we do not support parameterized SQL in JDBC also

Thanks
@balaji.ramaswamy

Hi,

Any update on parameterized SQL?

Hi @preetigupta

Not yet, we do not have that feature in the product yet

Thanks
Bali

Thanks for quick reply. Would you recommend any alternate way to avoid possible SQLInjection attack?

Best regards,
Preeti

Any update on parameterisation support in JDBC and ODBC?

Hi @spireite Not yet, currently it is not prioritized and certainly in the backlog to be picked up later

are you planning opensource jdbc driver?
we can contributing about it

Hi @dacopan I have checked with the right folks and someone will get back on this post

Hi @balaji.ramaswamy ,

Please can you let us know if there are any alternate way to avoid possible SQL Injection attack?

@preetigupta please let me know if you had find any alternate way?

Thanks,
Saurabh

Hi @balaji.ramaswamy , any news on parameterisation support in JDBC and ODBC?

Hi @bisware, parameterized query support is currently targeted for late 2024.

2 Likes

Hi, I am new to DremIO but would really like to use parameterized queries ! To be more precise, we would like to design dashboards with a bunch of parameterized queries so that our users would only have to enter the parameter values of interest to obtain a view of various request results.
Is the support really upcoming for the end of this year ? Would this allow to have the kind of dashboard I am describing ?
Thank you for your time

@maddie - We do this currently with Dremio Cloud & Tableau leveraging user defined functions in Dremio.

Can you point us to a Github issue where we can track progress without polling you guys here?