Jump to content
We've recently updated our Privacy Statement, available here ×
  • Jasperserver JDBC connection string for Azure Databricks


    Jivan Phadtare
    • Version: v8.0 Product: JasperReports® Server

    Requirement : How to make Jasperserver JDBC connection with Azure Databricks

    Steps :

    To make JDBC connection first need to install driver for Azure Databrick Database.

    1. Download the Databricks JDBC driver first and install it.

    https://www.databricks.com/spark/jdbc-drivers-download?_gl=1*83d6uu*_gcl_au*MzE5ODA0NjY2LjE2OTM1NjMxMTM.*rs_ga*YzA2MDI5ZDQtMTM4MC00ZjA1LWEwYjItOTVkNDE5NGJlNjQ1*rs_ga_PQSEQ3RZQC*MTY5MzgzMzY2MzI5My41LjAuMTY5MzgzMzY2NS42MC4wLjA.&_ga=2.128054533.88742494.1693808633-1895712523.1693563120

    2. Building the connection URL for the Databricks driver

    jdbc:databricks://<Server Hostname>:443;HttpPath=<Http Path>[;property=value[;property=value]]

    where:

    -jdbc:databricks:// (Required) is known as the subprotocol and is constant.

    -Server Hostname (Required) is the address of the server to connect to.

    -Http Path (Required) is the Databricks compute resources URL


    e.g. : The connection string would be in below format.

    jdbc:databricks://<databricks_server>:<port>;transportMode=http;ssl=true;httpPath=sql/protocol

    3) From jasperserver GUI,  navigate to Create --> Datasource screen and try to test the JDBC connection by entering connection string, username and password.

    4) Post connection is successful, the same URL can be configured in 'context.xml' file (apache-tomcat -> webapps -> jasperserver-pro -> META-INF).

    -------------------

    <Resource name="jdbc/databricks"   auth="Container" type="javax.sql.DataSource" driverClassName=<enter_driver_class_name>  url="jdbc:databricks:Server=<host_ip>;Port=443;TransportMode=HTTP;HTTPPath=MyHTTPPath;UseSSL=True;User=MyUser;Password=MyPassword;" maxActive="20" maxIdle="10" maxWait="-1" factory="com.jaspersoft.jasperserver.tomcat.jndi.JSCommonsBasicDataSourceFactory"/>

    -------------------

    5) Navigate to jasperserver-pro -> WEB-INF and add the following reference to the web.xml file:

    -------------------

    <resource-ref>

    <description>Databricks data JSP</description>

    <res-ref-name>jdbc/databricks</res-ref-name>

    <res-type>javax.sql.DataSource</res-type>

    <res-auth>Container</res-auth>

    </resource-ref>

    -------------------

    For additional reference, kindly visit to below URL.

    https://docs.databricks.com/en/integrations/jdbc-odbc-bi.html


    User Feedback

    Recommended Comments

    There are no comments to display.



    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

×
×
  • Create New...