Reference
BulkAPI
Data movement: synchronous import and export, batched import for large files, and asynchronous (job-based) import and export. 14 methods.
IOrgAPI org = ac.GetOrgInstance(orgId);
IWorkspaceAPI workspace = ac.GetWorkspaceInstance(orgId, workspaceId);
IViewAPI view = ac.GetViewInstance(orgId, workspaceId, viewId);
IBulkAPI bulk = ac.GetBulkInstance(orgId, workspaceId);BulkAPI exposes 14 methods. Method names are PascalCase and identifiers are long.
Methods#
ExportBulkData, ExportData, GetExportJobDetails, GetImportJobDetails, ImportBulkData, ImportBulkDataAsBatches, ImportBulkDataInNewTable, ImportBulkDataInNewTableAsBatches, ImportData, ImportDataInNewTable, ImportRawData, ImportRawDataInNewTable, InitiateBulkExport, InitiateBulkExportUsingSQL
ExportBulkData#
Stream ExportBulkData(long jobId)Export the mentioned job id and return a live response stream. Caller is responsible for closing the stream.
| Parameter | Description |
|---|---|
jobId | Id of the job to be exported. |
Returns (Stream) — Stream containing the exported data.
ExportData#
Stream ExportData(long viewId, string responseFormat, Dictionary config = null)/// Exports the specified table or view data and returns a stream containing the exported data.
| Parameter | Description |
|---|---|
viewId | Id of the view to be exported. |
responseFormat | The format in which the data has to be exported. |
config | Contains any additional control configurations. Can be null. |
Returns (Stream) — Stream containing the exported data.
GetExportJobDetails#
JsonElement GetExportJobDetails(long jobId)Returns the details of the export job.
| Parameter | Description |
|---|---|
jobId | Id of the export job. |
Returns (JsonElement) — Export job details.
GetImportJobDetails#
JsonElement GetImportJobDetails(long jobId)Returns the details of the import job.
| Parameter | Description |
|---|---|
jobId | Id of the import job. |
Returns (JsonElement) — Import result.
ImportBulkData#
long ImportBulkData(long viewId, string importType, string fileType, bool autoIdentify, string filePath, Dictionary config)Asynchronously import the data contained in the mentioned file into the table.
| Parameter | Description |
|---|---|
viewId | Id of the view where the data to be imported. |
importType | The import type. |
fileType | Type of the file to be imported. |
autoIdentify | Used to specify whether to auto identify the CSV format. Allowable values - true/false. |
filePath | Path of the file to be imported. |
config | Contains any additional control configurations. Can be null. |
Returns (long) — The created job id.
ImportBulkDataAsBatches#
long ImportBulkDataAsBatches(long viewId, string importType, bool autoIdentify, string filePath, int batchSize, Dictionary config)Import the data contained in the mentioned file into the table.
| Parameter | Description |
|---|---|
viewId | Id of the view where the data to be imported. |
importType | The import type. |
fileType | Type of the file to be imported. |
autoIdentify | Used to specify whether to auto identify the CSV format. Allowable values - true/false. |
filePath | Path of the file to be imported. |
batchSize | Number of lines per batch. |
config | Contains any additional control configurations. Can be null. |
Returns (long) — The created job id.
ImportBulkDataInNewTable#
long ImportBulkDataInNewTable(string tableName, string fileType, bool autoIdentify, string filePath, Dictionary config)Asynchronously create a new table and import the data contained in the mentioned file into the created table.
| Parameter | Description |
|---|---|
tableName | Name of the new table to be created. |
fileType | Type of the file to be imported. |
autoIdentify | Used to specify whether to auto identify the CSV format. Allowable values - true/false. |
filePath | Path of the file to be imported. |
config | Contains any additional control configurations. Can be null. |
Returns (long) — The created job id.
ImportBulkDataInNewTableAsBatches#
long ImportBulkDataInNewTableAsBatches(string tableName, bool autoIdentify, string filePath, int batchSize, Dictionary config)Asynchronously create a new table and import the data contained in the mentioned file into the created table.
| Parameter | Description |
|---|---|
tableName | Name of the new table to be created. |
fileType | Type of the file to be imported. |
autoIdentify | Used to specify whether to auto identify the CSV format. Allowable values - true/false. |
filePath | Path of the file to be imported. |
batchSize | Number of lines per batch. |
config | Contains any additional control configurations. Can be null. |
Returns (long) — The created job id.
ImportData#
JsonElement ImportData(long viewId, string importType, string fileType, bool autoIdentify, string filePath, Dictionary config)Import the data contained in the mentioned file into the table.
| Parameter | Description |
|---|---|
viewId | Id of the view where the data to be imported. |
importType | The import type. |
fileType | Type of the file to be imported. |
autoIdentify | Used to specify whether to auto identify the CSV format. Allowable values - true/false. |
filePath | Path of the file to be imported. |
config | Contains any additional control configurations. Can be null. |
Returns (JsonElement) — Import result.
ImportDataInNewTable#
JsonElement ImportDataInNewTable(string tableName, string fileType, bool autoIdentify, string filePath, Dictionary config)Create a new table and import the data contained in the mentioned file into the created table.
| Parameter | Description |
|---|---|
tableName | Name of the new table to be created. |
fileType | Type of the file to be imported. |
autoIdentify | Used to specify whether to auto identify the CSV format. Allowable values - true/false. |
filePath | Path of the file to be imported. |
config | Contains any additional control configurations. Can be null. |
Returns (JsonElement) — Import result.
ImportRawData#
JsonElement ImportRawData(long viewId, string importType, string fileType, bool autoIdentify, string rawData, Dictionary config)Import the raw data provided into the table.
| Parameter | Description |
|---|---|
viewId | Id of the view where the data to be imported. |
importType | The import type. |
fileType | Type of the file to be imported. |
autoIdentify | Used to specify whether to auto identify the CSV format. Allowable values - true/false. |
rawData | Raw data to be imported. |
config | Contains any additional control configurations. Can be null. |
Returns (JsonElement) — Import result.
ImportRawDataInNewTable#
JsonElement ImportRawDataInNewTable(string tableName, string fileType, bool autoIdentify, string rawData, Dictionary config)Create a new table and import the raw data provided into the created table.
| Parameter | Description |
|---|---|
tableName | Name of the new table to be created. |
fileType | Type of the file to be imported. |
autoIdentify | Used to specify whether to auto identify the CSV format. Allowable values - true/false. |
rawData | Raw data to be imported. |
config | Contains any additional control configurations. Can be null. |
Returns (JsonElement) — Import result.
InitiateBulkExport#
long InitiateBulkExport(long viewId, string responseFormat, Dictionary config)Initiate asynchronous export for the mentioned table (or) view data.
| Parameter | Description |
|---|---|
viewId | Id of the view to be exported. |
responseFormat | The format in which the data is to be exported. |
config | Contains any additional control configurations. Can be null. |
Returns (long) — Export job id.
InitiateBulkExportUsingSQL#
long InitiateBulkExportUsingSQL(string sqlQuery, string responseFormat, Dictionary config)Initiate asynchronous export with the given SQL Query.
| Parameter | Description |
|---|---|
sqlQuery | The SQL Query whose output is exported. |
responseFormat | The format in which the data is to be exported. |
config | Contains any additional control configurations. Can be null. |
Returns (long) — Export job id.