# new OsduR2UpdateByQueryTask(osdu_service, data_partition)
Parameters:
| Name | Type | Description |
|---|---|---|
osdu_service |
OsduR2BaseService | An implementation of the OSDU service class to broker communication with the OSDU API services |
data_partition |
string | The data partition against which requests will be made |
Methods
# async execute(transform_function) → {Object}
Execute the task, querying and updating in batches based on the set query parameters and the provided transform function
Parameters:
| Name | Type | Description |
|---|---|---|
transform_function |
TransformFunction | Function that accepts an OSDU record and the OSDU service and asynchronously returns the transformed record |
A summary of the performed task, including a list of the ids of transformed records transformedRecords, the total count of records for the query totalCount, the number of batches that succeeded batches, the last cursor used (if an error was encountered) lastCursor, and the error that was thrown (if encountered) error
# setQuery(query_params) → {OsduR2UpdateByQueryTask}
Set the query parameters to be used for batched query requests
Parameters:
| Name | Type | Description |
|---|---|---|
query_params |
Object | Query parameters built using the OsduQueryBuilder |
Itself to allow chaining