Choose where you’d like to start

Update data in Zoho Analytics

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 typeDescription
<variable> KEY-VALUEis the variable that will contain the response returned by Zoho Analytics.
<database_name> TEXTis the name of the database in which the data will be updated.
<table_name>TEXTis the name of the table from which the row will be updated.
<data_map>KEY-VALUEKey-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:

=!=<>
<=>=LIKENOT LIKE
INNOT INBETWEEN (to be used as: "BETWEEN '<value1>' AND '<value2>'")

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:

  • In view of stopping new authtoken generation, a Zoho OAuth connection with appropriate scopes is mandatory for new integration tasks (created after the deadline specified in the post) to work as expected. Existing integration tasks will continue to work with or without the connections parameter unless the authtoken is manually deleted from accounts.
  • Add relevant scopes mentioned in Zoho Analytics API document while creating the connection.
  • Refer to this post for the list of Zoho services that support the connections page.
  • Learn more about connections

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,

ParamExplanation
mapResponsevariable 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"
   ]
}

Related Links

Get Started Now

Execute