Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I am in the process of creating a Paginated Report that is running direct queries to a databricks server using an ODBC connection.
When I try and add a Parameter to the query using "@" then the query is failing to validate and is reporting a syntax error. If I remove the @ and replace it with a value then the query works fine.
I presume this is an issue with SQL code within databricks. Has anybody come across this before got a solution?
Hi @GrayMarshUK ,
What is your code for the parameter part?
In Databricks SQL, parameters are not prefixed with as in traditional SQL. Instead, they are enclosed in double curly braces .
Query parameters - Azure Databricks
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
This is a basic version of the query that works fine with Azure Warehouse
SELECT site, site_bk
FROM dev.cur_uki_commercial.commercial_dim_location
WHERE site = @customer
Tried the follwoing but still get an error
SELECT site, site_bk
FROM dev.cur_uki_commercial.commercial_dim_location
WHERE site ={{ @customer }}
User | Count |
---|---|
96 | |
87 | |
78 | |
72 | |
68 |
User | Count |
---|---|
111 | |
104 | |
85 | |
65 | |
63 |