Update data in Zoho Analytics
Table of ContentsUp
Overview
This task is used to update rows in a table in Zoho Analytics.
This integration task is based on the Zoho Analytics API - Update Row.
Syntax
<variable> = zoho.reports.updateData(<database_name>, <table_name>, <data_map>, <criteria>, <connection>);
where,
Params | Data type | Description | ||||||||||||
<variable> | KEY-VALUE | is the variable that will contain the response returned by Zoho Analytics. | ||||||||||||
<database_name> | TEXT | is the name of the database in which the data will be updated. | ||||||||||||
<table_name> | TEXT | is the name of the table from which the row will be updated. | ||||||||||||
<data_map> | KEY-VALUE | Key-value pairs with keys as the column names, along with their updated values. Values must be compatible with the column data type. If not, the value will not be assigned. | ||||||||||||
<criteria> | TEXT | Criteria based on which rows will be updated. The criteria must be in the format: "<column_name> <operator> '<value>'" Following is the list of supported operators:
You can specify an empty string for this param, in which case all the rows will be updated. | ||||||||||||
<connection> | TEXT | specifies the name of the Zoho Analytics connection. Note:
|
Example: Update rows in Zoho Analytics
The following sample snippet updates rows which meet the specified criteria.
mapResponse = zoho.reports.updateData("Website", "Search Analytics", {"name" : "Tony"}, "name='John'", "analytics_connection" );
where,
Param | Explanation |
mapResponse | variable that holds the returned response. |
"Website" | is the Database name in Zoho Analytics |
"Search Analytics" | is the table name in Zoho Analytics |
"name" | is a column name in Zoho Analytics |
"Tony" | is the updated value for the name column |
= | refers to the operator. |
'John' | is the required column value. All columns having John as the value will be updated. |
"analytics_connection" | is the connection link name |
Sample Response
The following is a sample success response:
{
"updatedRows":"1",
"updatedColumns":[
"name"
]
}
"updatedRows":"1",
"updatedColumns":[
"name"
]
}
Related Links
- Zoho Analytics API
- Common error codes can be viewed here