JDBC Driver for Zoho Analytics CloudSQL
CloudSQL enables users to execute SQL queries on structured data stored in Zoho Analytics, it also lends itself naturally to support Database Connectivity Standard like JDBC (Java Database Connectivity). Developers who are familiar using JDBC driver for connectivity to databases, can now use Zoho Analytics CloudSQL JDBC driver to connect and execute the necessary SQL queries.
With the availablity of this JDBC driver, developers need not learn the Zoho Analytics CloudSQL HTTP Web API to execute the SQL query. They just have know how to use the Zoho Analytics JDBC driver and start interacting with the service, the same way as they would interact with a Workspace using a JDBC standard driver.
- Zoho Analytics JDBC Driver Download
- Zoho Analytics JDBC Driver
- JDBC Connection URL for Zoho Analytics
- Sample
- Jars to be kept in CLASSPATH for JDBC Driver
- JDBC Type Mapping with Zoho Analytics Data types
- Connecting Zoho Analytics from Workspace Visualization Tools
- DBVisualizer
- Squirrel SQL Client
ZOHO ANALYTICS JDBC DRIVER DOWNLOAD
Download the Zoho Analytics JDBC Driver from the below link.
https://downloads.zohocdn.com/analytics-api-desktop/jdbc/ZohoCloudSQLJDBC_1_0.zip
JAVADOCS
- Javadocs of Zoho Analytics JDBC Driver
- Javadocs of JDBC interface (package java.sql)
ZOHO ANALYTICS JDBC DRIVER
To use the JDBC Driver you need to have a zoho login email address and password. Currently you could only execute Select queries using the JDBC driver. Other SQL statements will be supported soon.
In JDBC, the DriverManager class manages the establishment of connections. DriverManager needs to be told which JDBC driver it should try to make connections with. The way to do this is to use Class.forName( ) on the class that implements java.sql.Driver interface.
Refer to the Zoho Analytics JDBC Driver javadocs to know more about the same. Click to download Zoho Analytics JDBC Driver.
JDBC CONNECTION URL FOR ZOHO ANALYTICS
SAMPLE
The sample code is shown in the code block.
JARS TO BE KEPT IN CLASSPATH FOR JDBC DRIVER
All the jars from 'ZohoCloudSQLJDBC_1_0/Zoho/CloudSQLJDBCDriver/lib’ directory within the JDBC Driver Zip need to be kept in CLASSPATH for JDBC driver.
JDBC TYPE MAPPING WITH ZOHO ANALYTICS DATA TYPES
The following table provides the mapping between the Zoho Analytics data types and the JDBC SQL types. Use this mapping to process the data fetched from Zoho Analytics in your Java code.
Zoho Analytics Data type | JDBC SQL Type |
---|---|
Plain Text | VARCHAR |
Multi Line Text | LONGVARCHAR |
VARCHAR | |
Auto Number | BIGINT |
Number | BIGINT |
Positive Number | BIGINT |
Decimal Number | DOUBLE |
Currency | DOUBLE |
Percent | DOUBLE |
Date | TIMESTAMP |
Decision Box | BIT |
CONNECTING ZOHO ANALYTICS FROM WORKSPACE VISUALIZATION TOOLS
Zoho Analytics JDBC Driver supports connecting Zoho Analytics from the following Workspace Visualizations tools.
- DBVisualizer
- Squirrel SQL Client
Sample:
Copied
The example Java code snippet shows how you can register Zoho Analytics CloudSQL JDBC driver, obtain a Connection, create a Statement and execute the query.