Bulk Write Rows

Catalyst enables you to perform bulk write jobs on a specific table present in the Data Store. The bulk write operation can fetch thousands of records from a CSV file uploaded in Stratus and insert them in a specific table.

The table is referred to by its unique Table ID. The column in which the write operation must be performed is referred to by its unique column ID.

Note: To perform a bulk write operation, you must first upload the required data as a CSV file in Stratus.

During the write job, the file will be referred to using the following attributes:

  • bucketName: The name of the bucket, where the object is stored.
  • objectKey: Can contain the path or the Object URL of the required object.
  • versionID: If the bucket has versioning enabled, then the specific versionID of the file will be stored in this attribute.

These details will need to be resolved as a JSON object named objectDetails, and passed to the setObjectDetails() method.

Catalyst supports the following methods for bulk write in Java SDK:

Method Used Description
createBulkWriteJob(bulkWriteDetails) Create a new bulk write job on a specific table.
createInsertBulkWriteJob(table ID, objectDetails) Create a new bulk write insert job.
createUpsertBulkWriteJob(tableId, objectDetails, column ID) Create a new bulk write upsert job.
getBulkWriteJobDetails(jobID) Get the status and results of a bulk write job.

Copy the SDK snippet below to perform a bulk write job on a particular table.

Sample Code Snippet


Package Imports
copy
import com.zc.component.object.bulk.ZCBulkWriteServices;
import com.zc.component.object.bulk.ZCDataStoreBulk;
import com.zc.component.object.bulk.result.ZCBulkResult;
import com.zc.component.object.bulk.ZCBucketObjectDetails;
import com.zc.component.object.bulk.ZCBulkWriteDetails 
copy
ZCBulkWriteServices bulkWrite = ZCDataStoreBulk.getInstance().getBulkWriteInstance(); 
// create bulk write instance
ZCBulkWriteDetails bulkWriteDetails = ZCBulkWriteDetails.getInstance(); 
// create and fill the bulk write details object
bulkWriteDetails.setTableIdentifier(12096000000642178L);  // Provide your Table ID
bulkWriteDetails.setObjectDetails(objectDetails);
ZCBulkResult bulkWriteResult = bulkWrite.createBulkWriteJob(bulkWriteDetails); 
// create bulk write job
bulkWrite.createInsertBulkWriteJob(12096000000642178L, objectDetails);  // Provide your Table ID
// create bulk write insert job
bulkWrite.createUpdateBulkWriteJob(12096000000642178L, objectDetails, 12096000000642900L); // Provide your Table ID and Column ID
// create bulk write insert job
bulkWrite.createUpsertBulkWriteJob(12096000000642178L, objectDetails, 12096000000642900L);  // Provide your Table ID and Column ID
// create bulk write upsert job
bulkWrite.getBulkWriteJobStatus(bulkWriteResult.getJobId()); 
// get the bulk write job status and results

Note: A maximum of 100,000 rows can be written simultaneously using the createBulkWriteJob() method.

Last Updated 2025-11-19 20:37:41 +0530 IST

ON THIS PAGE

RELATED LINKS

Data Store