Class BulkAPI
BulkAPI module contains APIs used to import bulk data into Zoho Analytics table and also offers APIs to export your tables, reports, dashboards in PDF, Excel, JSON, HTML, Image, and CSV formats.
Inheritance
Implements
Inherited Members
Namespace: ZohoAnalytics
Assembly: ZohoAnalytics.dll
Syntax
public class BulkAPI : IBulkAPI
Methods
ExportBulkData(long)
Export the mentioned job id and return a live response stream. Caller is responsible for closing the stream.
Declaration
public Stream ExportBulkData(long jobId)
Parameters
| Type | Name | Description |
|---|---|---|
| long | jobId | Id of the job to be exported. |
Returns
| Type | Description |
|---|---|
| Stream | Stream containing the exported data. |
ExportBulkData(long, string)
Export the mentioned job id and write data directly to file (streamed).
Declaration
public void ExportBulkData(long jobId, string filePath)
Parameters
| Type | Name | Description |
|---|---|---|
| long | jobId | Id of the job to be exported. |
| string | filePath | Path of the file where the data exported to be stored. |
ExportData(long, string, Dictionary<string, object>)
/// Exports the specified table or view data and returns a stream containing the exported data.
Declaration
public Stream ExportData(long viewId, string responseFormat, Dictionary<string, object> config = null)
Parameters
| Type | Name | Description |
|---|---|---|
| long | viewId | Id of the view to be exported. |
| string | responseFormat | The format in which the data has to be exported. |
| Dictionary<string, object> | config | Contains any additional control configurations. Can be null. |
Returns
| Type | Description |
|---|---|
| Stream | Stream containing the exported data. |
ExportData(long, string, string, Dictionary<string, object>)
Export the mentioned table (or) view data.
Declaration
public void ExportData(long viewId, string responseFormat, string filePath, Dictionary<string, object> config = null)
Parameters
| Type | Name | Description |
|---|---|---|
| long | viewId | Id of the view to be exported. |
| string | responseFormat | The format in which the data has to be exported. |
| string | filePath | Path of the file where the data exported to be stored. |
| Dictionary<string, object> | config | Contains any additional control configurations. Can be null. |
GetExportJobDetails(long)
Returns the details of the export job.
Declaration
public JsonElement GetExportJobDetails(long jobId)
Parameters
| Type | Name | Description |
|---|---|---|
| long | jobId | Id of the export job. |
Returns
| Type | Description |
|---|---|
| JsonElement | Export job details. |
GetImportJobDetails(long)
Returns the details of the import job.
Declaration
public JsonElement GetImportJobDetails(long jobId)
Parameters
| Type | Name | Description |
|---|---|---|
| long | jobId | Id of the import job. |
Returns
| Type | Description |
|---|---|
| JsonElement | Import result. |
ImportBulkData(long, string, string, bool, string, Dictionary<string, object>)
Asynchronously import the data contained in the mentioned file into the table.
Declaration
public long ImportBulkData(long viewId, string importType, string fileType, bool autoIdentify, string filePath, Dictionary<string, object> config)
Parameters
| Type | Name | Description |
|---|---|---|
| long | viewId | Id of the view where the data to be imported. |
| string | importType | The import type. |
| string | fileType | Type of the file to be imported. |
| bool | autoIdentify | Used to specify whether to auto identify the CSV format. Allowable values - true/false. |
| string | filePath | Path of the file to be imported. |
| Dictionary<string, object> | config | Contains any additional control configurations. Can be null. |
Returns
| Type | Description |
|---|---|
| long | The created job id. |
ImportBulkDataAsBatches(long, string, bool, string, int, Dictionary<string, object>)
Import the data contained in the mentioned file into the table.
Declaration
public long ImportBulkDataAsBatches(long viewId, string importType, bool autoIdentify, string filePath, int batchSize, Dictionary<string, object> config)
Parameters
| Type | Name | Description |
|---|---|---|
| long | viewId | Id of the view where the data to be imported. |
| string | importType | The import type. |
| bool | autoIdentify | Used to specify whether to auto identify the CSV format. Allowable values - true/false. |
| string | filePath | Path of the file to be imported. |
| int | batchSize | Number of lines per batch. |
| Dictionary<string, object> | config | Contains any additional control configurations. Can be null. |
Returns
| Type | Description |
|---|---|
| long | The created job id. |
ImportBulkDataInNewTable(string, string, bool, string, Dictionary<string, object>)
Asynchronously create a new table and import the data contained in the mentioned file into the created table.
Declaration
public long ImportBulkDataInNewTable(string tableName, string fileType, bool autoIdentify, string filePath, Dictionary<string, object> config)
Parameters
| Type | Name | Description |
|---|---|---|
| string | tableName | Name of the new table to be created. |
| string | fileType | Type of the file to be imported. |
| bool | autoIdentify | Used to specify whether to auto identify the CSV format. Allowable values - true/false. |
| string | filePath | Path of the file to be imported. |
| Dictionary<string, object> | config | Contains any additional control configurations. Can be null. |
Returns
| Type | Description |
|---|---|
| long | The created job id. |
ImportBulkDataInNewTableAsBatches(string, bool, string, int, Dictionary<string, object>)
Asynchronously create a new table and import the data contained in the mentioned file into the created table.
Declaration
public long ImportBulkDataInNewTableAsBatches(string tableName, bool autoIdentify, string filePath, int batchSize, Dictionary<string, object> config)
Parameters
| Type | Name | Description |
|---|---|---|
| string | tableName | Name of the new table to be created. |
| bool | autoIdentify | Used to specify whether to auto identify the CSV format. Allowable values - true/false. |
| string | filePath | Path of the file to be imported. |
| int | batchSize | Number of lines per batch. |
| Dictionary<string, object> | config | Contains any additional control configurations. Can be null. |
Returns
| Type | Description |
|---|---|
| long | The created job id. |
ImportData(long, string, string, bool, string, Dictionary<string, object>)
Import the data contained in the mentioned file into the table.
Declaration
public JsonElement ImportData(long viewId, string importType, string fileType, bool autoIdentify, string filePath, Dictionary<string, object> config)
Parameters
| Type | Name | Description |
|---|---|---|
| long | viewId | Id of the view where the data to be imported. |
| string | importType | The import type. |
| string | fileType | Type of the file to be imported. |
| bool | autoIdentify | Used to specify whether to auto identify the CSV format. Allowable values - true/false. |
| string | filePath | Path of the file to be imported. |
| Dictionary<string, object> | config | Contains any additional control configurations. Can be null. |
Returns
| Type | Description |
|---|---|
| JsonElement | Import result. |
ImportDataInNewTable(string, string, bool, string, Dictionary<string, object>)
Create a new table and import the data contained in the mentioned file into the created table.
Declaration
public JsonElement ImportDataInNewTable(string tableName, string fileType, bool autoIdentify, string filePath, Dictionary<string, object> config)
Parameters
| Type | Name | Description |
|---|---|---|
| string | tableName | Name of the new table to be created. |
| string | fileType | Type of the file to be imported. |
| bool | autoIdentify | Used to specify whether to auto identify the CSV format. Allowable values - true/false. |
| string | filePath | Path of the file to be imported. |
| Dictionary<string, object> | config | Contains any additional control configurations. Can be null. |
Returns
| Type | Description |
|---|---|
| JsonElement | Import result. |
ImportRawData(long, string, string, bool, string, Dictionary<string, object>)
Import the raw data provided into the table.
Declaration
public JsonElement ImportRawData(long viewId, string importType, string fileType, bool autoIdentify, string rawData, Dictionary<string, object> config)
Parameters
| Type | Name | Description |
|---|---|---|
| long | viewId | Id of the view where the data to be imported. |
| string | importType | The import type. |
| string | fileType | Type of the file to be imported. |
| bool | autoIdentify | Used to specify whether to auto identify the CSV format. Allowable values - true/false. |
| string | rawData | Raw data to be imported. |
| Dictionary<string, object> | config | Contains any additional control configurations. Can be null. |
Returns
| Type | Description |
|---|---|
| JsonElement | Import result. |
ImportRawDataInNewTable(string, string, bool, string, Dictionary<string, object>)
Create a new table and import the raw data provided into the created table.
Declaration
public JsonElement ImportRawDataInNewTable(string tableName, string fileType, bool autoIdentify, string rawData, Dictionary<string, object> config)
Parameters
| Type | Name | Description |
|---|---|---|
| string | tableName | Name of the new table to be created. |
| string | fileType | Type of the file to be imported. |
| bool | autoIdentify | Used to specify whether to auto identify the CSV format. Allowable values - true/false. |
| string | rawData | Raw data to be imported. |
| Dictionary<string, object> | config | Contains any additional control configurations. Can be null. |
Returns
| Type | Description |
|---|---|
| JsonElement | Import result. |
InitiateBulkExport(long, string, Dictionary<string, object>)
Initiate asynchronous export for the mentioned table (or) view data.
Declaration
public long InitiateBulkExport(long viewId, string responseFormat, Dictionary<string, object> config)
Parameters
| Type | Name | Description |
|---|---|---|
| long | viewId | Id of the view to be exported. |
| string | responseFormat | The format in which the data is to be exported. |
| Dictionary<string, object> | config | Contains any additional control configurations. Can be null. |
Returns
| Type | Description |
|---|---|
| long | Export job id. |
InitiateBulkExportUsingSQL(string, string, Dictionary<string, object>)
Initiate asynchronous export with the given SQL Query.
Declaration
public long InitiateBulkExportUsingSQL(string sqlQuery, string responseFormat, Dictionary<string, object> config)
Parameters
| Type | Name | Description |
|---|---|---|
| string | sqlQuery | The SQL Query whose output is exported. |
| string | responseFormat | The format in which the data is to be exported. |
| Dictionary<string, object> | config | Contains any additional control configurations. Can be null. |
Returns
| Type | Description |
|---|---|
| long | Export job id. |