DocsReferenceBulkAPI

Reference

BulkAPI

Data movement: synchronous import and export, batched import for large files, and asynchronous (job-based) import and export. 14 methods.

ruby
org       = ac.get_org_instance(ORG_ID)
workspace = ac.get_workspace_instance(ORG_ID, WORKSPACE_ID)
view      = ac.get_view_instance(ORG_ID, WORKSPACE_ID, VIEW_ID)
bulk      = ac.get_bulk_instance(ORG_ID, WORKSPACE_ID)

BulkAPI exposes 14 methods. Method names are snake_case and identifiers are string.

Methods#

export_bulk_data, export_data, get_export_job_details, get_import_job_details, import_bulk_data, import_bulk_data_in_new_table, import_data, import_data_as_batches, import_data_in_new_table, import_data_in_new_table_as_batches, import_raw_data, import_raw_data_in_new_table, initiate_bulk_export, initiate_bulk_export_using_sql

export_bulk_data#

ruby
export_bulk_data(job_id, file_path)

Downloads the exported data for a given job ID.

ParameterTypeDescription
job_idStringID of the export job to download.
file_pathStringPath to save the exported file.

Returns (nil) — nil

export_data#

ruby
export_data(view_id, response_format, file_path, config = {})

Exports the specified view's data to a file.

ParameterTypeDescription
view_idStringID of the view to export.
response_formatStringFormat in which to export the data.
file_pathStringPath to the file where exported data will be stored.
configHashOptional configuration parameters.

get_export_job_details#

ruby
get_export_job_details(job_id)

Retrieves details of a specific export job.

ParameterTypeDescription
job_idStringThe export job ID.

Returns (Hash) — Export job metadata and status.

get_import_job_details#

ruby
get_import_job_details(job_id)

Retrieves the details of an import job by its ID.

ParameterTypeDescription
job_idStringThe job ID to query.

Returns (Hash) — Job details and status.

import_bulk_data#

ruby
import_bulk_data(view_id, import_type, file_type, auto_identify, file_path, config = {})

Initiates asynchronous import of data into an existing view.

ParameterTypeDescription
view_idStringTarget view ID.
import_typeStringType of import (APPEND, etc.).
file_typeStringFile format.
auto_identifyStringWhether to auto-detect format.
file_pathStringPath to the file.
configHashAdditional parameters.

Returns (String) — Job ID.

import_bulk_data_in_new_table#

ruby
import_bulk_data_in_new_table(table_name, file_type, auto_identify, file_path, config = {})

Initiates asynchronous import of data into a new table.

ParameterTypeDescription
table_nameStringTarget table name.
file_typeStringFile format (e.g., "csv").
auto_identifyStringWhether to auto-detect file format.
file_pathStringPath to the data file.
configHashAdditional parameters.

Returns (String) — Job ID of the import operation.

import_data#

ruby
import_data(view_id, import_type, file_type, auto_identify, file_path, config = {})

Imports data to an existing view from a file.

ParameterTypeDescription
view_idStringThe ID of the target view.
import_typeStringType of import: "APPEND", "TRUNCATEADD", or "UPDATEADD".
file_typeStringFile format (e.g., "csv").
auto_identifyStringWhether to auto-identify the format.
file_pathStringPath to the input file.
configHashOptional additional parameters.

Returns (Hash) — API response data.

import_data_as_batches#

ruby
import_data_as_batches(view_id, import_type, auto_identify, file_path, batch_size, config = {}, tool_config = {})

Asynchronously imports data to an existing view in batches.

ParameterTypeDescription
view_idStringTarget view ID.
import_typeStringType of import.
auto_identifyStringWhether to auto-identify format.
file_pathStringFile path for input.
batch_sizeIntegerNumber of rows per batch.
configHashAdditional options.
tool_configHashInternal config for SDK tool.

Returns (String) — Job ID of the batch import.

import_data_in_new_table#

ruby
import_data_in_new_table(table_name, file_type, auto_identify, file_path, config = {})

Imports data from a file to a new table.

ParameterTypeDescription
table_nameStringName of the new table to be created.
file_typeStringType of the file (e.g., "csv", "json").
auto_identifyStringWhether to auto-identify the file format ("true" or "false").
file_pathStringLocal path to the import file.
configHashAdditional optional parameters.

Returns (Hash) — The response data from the API.

import_data_in_new_table_as_batches#

ruby
import_data_in_new_table_as_batches(table_name, auto_identify, file_path, batch_size, config = {}, tool_config = {})

Create a new table and import the data contained in the mentioned file into the created table.

ParameterTypeDescription
table_nameStringName of the new table to be created.
auto_identifyStringUsed to specify whether to auto identify the CSV format. Allowable values - true/false.
file_pathStringPath of the file to be imported.
batch_sizeIntegerNumber of lines per batch.
configHashContains any additional control parameters. Can be nil.
tool_configHashContains any additional control parameters for the library. Can be nil.

Returns (String) — Import job id

import_raw_data#

ruby
import_raw_data(view_id, import_type, file_type, auto_identify, data, config = {})

Imports raw data to an existing view.

ParameterTypeDescription
view_idStringID of the target view.
import_typeStringType of import (APPEND, etc.).
file_typeStringFormat of the raw data.
auto_identifyStringWhether to auto-identify format.
dataStringRaw data content.
configHashAdditional parameters.

Returns (Hash) — API response data.

import_raw_data_in_new_table#

ruby
import_raw_data_in_new_table(table_name, file_type, auto_identify, data, config = {})

Imports raw data (as a string or byte array) to a new table.

ParameterTypeDescription
table_nameStringName of the new table to be created.
file_typeStringType of the raw data (e.g., "csv").
auto_identifyStringWhether to auto-identify format.
dataStringRaw data content.
configHashAdditional parameters.

Returns (Hash) — Import result from the API.

initiate_bulk_export#

ruby
initiate_bulk_export(view_id, response_format, config = {})

Initiates an asynchronous export for the given view.

ParameterTypeDescription
view_idStringID of the view to be exported.
response_formatStringFormat of the exported data (e.g., "csv", "json").
configHashAdditional optional parameters.

Returns (String) — Job ID of the export operation.

initiate_bulk_export_using_sql#

ruby
initiate_bulk_export_using_sql(sql_query, response_format, config = {})

Initiates an asynchronous export using a SQL query.

ParameterTypeDescription
sql_queryStringSQL query to run for export.
response_formatStringFormat of the exported data.
configHashAdditional control parameters.

Returns (String) — Job ID of the export task.

  • Errors — the failure envelope and codes worth branching on.
  • Limits — throttles and quotas that apply to these calls.
Zoho Analytics Ruby SDK · REST API v2 Generated 2026-10-27