CloudSQL SDKs

To enable developers to easily use the Zoho Analytics CloudSQL HTTP API, we have provided Client libraries in the below given programming languages.

JAVA CLIENT LIBRARY

Java SDK wraps the HTTP API of Zoho Analytics with the easy to use methods in Java language. This could be used if you do not want to use the Zoho Analytics JDBC Driver.

SAMPLE CODE SNIPPET FOR USING CLOUDSQL WITH JAVA CLIENT API:

ReportClient rc = Config.getReportClient();
rc.login(Config.LOGINNAME,Config.PASSWORD);
String uri = rc.getURI(Config.LOGINNAME,Config.DATABASENAME);
String sql = "select \"Customer Name \",Sales,Cost, \"Profit (Sales) \" from Sales where Region = 'East'";
rc.exportDataUsingSQL(uri,"CSV",new File("Test.csv"),sql,null); 

For more details on Java client libraries, view this link.

PYTHON CLIENT LIBRARY

Python SDK wraps the HTTP API of Zoho Analytics with the easy to use methods in Python language.

SAMPLE CODE SNIPPET FOR USING CLOUDSQL WITH PYTHON CLIENT API:

ReportClient rc = ReportClient(Config.APIKEY)
rc.login(Config.LOGINNAME,Config.PASSWORD)
uri = rc.getDBURI(Config.LOGINNAME,Config.DATABASENAME)
sql = "select Region from StoreSales"
rc.exportDataUsingSQL(uri,"CSV",sys.stdout,sql,None) 

For more details on Python client libraries, kindly view this link.

C# CLIENT LIBRARY

C# Client Library wraps the HTTP API of Zoho Analytics with the easy to use methods in C# .Net programming language.

SAMPLE CODE SNIPPET FOR USING CLOUDSQL WITH C# CLIENT API:
IReportClient RepClient = new ReportClient(clientId, clientSecret, refreshToken);
string WorkspaceURI = RepClient.GetURI("user@sampledomain.com", "MyWorkspace");
RepClient.ExportData(WorkspaceURI, "XML", "Output.xml", "select * from MyTable", null); 

For more details on C# client libraries, kindly view this link.