cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

ODBC PowerBI 2 commands in one query

mamiya
New Contributor II

 

Hello everyone,

I'm trying to use the ODBC DirectQuery option in PowerBI, but I keep getting an error about another command. The SQL query works while using the SQL Editor. Do I need to change the setup of my ODBC connector?



DECLARE dateFrom DATE = DATEADD(YEAR, -1, GETDATE());
SELECT dateFrom AS dateFrom;

 

mamiya_0-1714651686806.png

 

mamiya_3-1714651948145.png

 

 

1 REPLY 1

mamiya
New Contributor II

HI thanks for replying. I tried also query the same command in python using SQL class but without any success. 

9aRxW1cRCA.png

SQL machine is configured correctly and works with PowerBI, Python if user query only one command. We would like to use parameters and create final query from other selects. Do you think it possible to use more than one command per query? 

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