Bulk Read Rows

Catalyst allows you to perform bulk read jobs on a specific table present in the Data Store.

In the SDK snippet below, the Bulk Read job can read thousands of records from a specific table and generate a CSV file containing the results of the read operation, if the job is successful. The table is referred to by its unique Table ID.

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

Method Used Description
createBulkReadJob() Create a new bulk read job.
getBulkReadJobStatus() to find out the status and the result of the bulk read job.

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

Ensure the following packages are imported:

    
copy
import com.zc.component.object.bulk.ZCBulkReadServices; import com.zc.component.object.bulk.ZCBulkQueryDetails; import com.zc.component.object.bulk.ZCBulkCallbackDetails; import com.zc.component.object.bulk.ZCDataStoreBulk; import com.zc.component.object.bulk.result.ZCBulkResult; import com.zc.component.object.bulk.ZCBulkReadDetails;
    
copy
ZCBulkReadServices bulkRead = ZCDataStoreBulk.getInstance().getBulkReadInstance(); bulkRead.createBulkReadJob(12096000000642178L); //Provide your Table ID // create bulkread job with table ID ZCBulkQueryDetails bulkQueryDetails = ZCBulkQueryDetails.getInstance(); // get bulk query details instance ZCBulkCallbackDetails callbackDetails = ZCBulkCallbackDetails.getInstance(); // get bulk callback details instance bulkRead.createBulkReadJob(12096000000642178L, bulkQueryDetails); //Provide your Table ID // create bulkread job with table ID and query details bulkRead.createBulkReadJob(12096000000642178L, bulkQueryDetails, callbackDetails); //Provide your Table ID // create bulkread job with table ID, query details and callback details. ZCBulkReadDetails bulkReadDetails = ZCBulkReadDetails.getInstance(); // create bulk read details instance. bulkReadDetails.setTableIdentifier(12096000000642178L); //Provide your Table ID ZCBulkResult readJob = bulkRead.createBulkReadJob(bulkReadDetails); // create bulkread job with bulk read details. bulkRead.getBulkReadJobStatus(readJob.getJobId()); // get bulk read job status and result

Note: A maximum of 200,000 rows can be read simultaneously using the createBulkReadJob() method.

Last Updated 2023-12-14 16:25:23 +0530 +0530

ON THIS PAGE

RELATED LINKS

Data Store