Create a row in Zoho Analytics
Table of Contents
Overview
This task is used to create a row in a table in Zoho Analytics.
This integration task is based on the Zoho Analytics API - Add Row.
Syntax
<variable> = zoho.reports.createRow(<database_name>, <table_name>, <data_map>, <connection>);
Parameter | Data type | Description |
<variable> | KEY-VALUE | is the variable that will hold the response returned by Zoho Analytics. |
<database_name> | TEXT | is the name of the database in Zoho Analytics which contains the required table. |
<table_name> | TEXT | is the name of the table in which the row will be created. |
<data_map> | KEY-VALUE | Key-value pairs with keys as the column names, along with their corresponding values. |
<connection> | TEXT | specifies the name of the Zoho Analytics connection. Note:
|
Example: Create a row in Zoho Analytics
The following sample snippet creates a row in Zoho Analytics with the given details.
rowInfo = map();
rowInfo.put("Region", "India");
rowInfo.put("Product Category", "Business Process");
rowInfo.put("Product", "Creator");
rowInfo.put("Customer Name", "John");
rowInfo.put("Sales", 1000);
mapResponse = zoho.reports.createRow("Website", "Search Analytics", rowInfo, "analytics_connection" );
rowInfo.put("Region", "India");
rowInfo.put("Product Category", "Business Process");
rowInfo.put("Product", "Creator");
rowInfo.put("Customer Name", "John");
rowInfo.put("Sales", 1000);
mapResponse = zoho.reports.createRow("Website", "Search Analytics", rowInfo, "analytics_connection" );
where,
Param | Explanation |
rowinfo | is a map variable that holds key-value pairs. |
"Region" "Product Category" "Product" "Customer Name" "Sales" | are the column names in the table. |
India Business Process Creator John 1000 | are column values. |
mapResponse | varibale that holds the returned response. |
"Website" | is the Database name in Zoho Analytics |
"Search Analytics" | is the table name in Zoho Analytics |
"analytics_connection" | is the connection link name |
Sample Response
The following is a sample success response:
{
"Region":"India",
"Product Category":"Business Process",
"Product":"Creator",
"Customer Name":"John"
"Sales":"1000"
}
"Region":"India",
"Product Category":"Business Process",
"Product":"Creator",
"Customer Name":"John"
"Sales":"1000"
}
Related Links
- Zoho Analytics API
- Common error codes can be viewed here