Forum Discussion

GrayMarshUK's avatar
GrayMarshUK
Frequent Visitor
2 years ago

Paginated Report with Direct Connection to Databricks

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?

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    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

    • GrayMarshUK's avatar
      GrayMarshUK
      Frequent Visitor

      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 }}


       

  • mshah1's avatar
    mshah1
    Regular Visitor

    Hi Gary - i am trying to connect paginated report builder to Databricks direct query. Can you please show me connection steps.

     

    Thanks,
    Maz