cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Warehousing & Analytics
Engage in discussions on data warehousing, analytics, and BI solutions within the Databricks Community. Share insights, tips, and best practices for leveraging data for informed decision-making.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Does the ODBC driver for databricks support parameterized queries?

DilyanDimitrov
Visitor

Hi all,

I am using the official ODBC driver for databricks downloaded from here (the latest version) and trying to have a dotnet API (C#) fetching data from databricks via the driver. I am using the general Microsoft package for ODBC connection - System.Data.Odbc. 

But it seems like when trying to execute a parameterized query I get the UNBOUND_SQL_PARAMETER error which says that the values for the params has not been passed.

Here is a snippet of my code:

 

using OdbcCommand command = connection.CreateCommand();
command.CommandText = Sql;
command.Parameters.Add(new OdbcParameter("param1", param1));
command.Parameters.Add(new OdbcParameter("param2", param2));

using OdbcDataReader reader = command.ExecuteReader();

 

and in the query I have :param1 and :param2.

I am wondering if the ODBC driver supports passing params to queries? 

0 REPLIES 0

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group