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.
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
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 accountSign in
Already have an account? Sign in here.
Sign In Now