Skip to content

v.8.7.0

Latest
Compare
Choose a tag to compare
@jansivans jansivans released this 23 Oct 10:00
· 1 commit to master since this release
  • A new postLoadQuery option has been added to the MysqlDestination, allowing you to retrieve query results after a batch load. This is particularly useful when you need to load data and execute a query such as SELECT LAST_INSERT_ID() within single connection:
const destination = new MySqlDestination({
    connection,
    table: 'test',
    batchSize: 1,
    postLoadQuery: `SELECT LAST_INSERT_ID()`,
});
job.on('loadedBatch', async (destinationIndex, data, result) => {
    const lastInsertId = result[0][0]['LAST_INSERT_ID()'];
});
  • Add useSourceColumns option to MysqlDestination - this option allows you to configure the MysqlDestination to only insert columns present in the source data.
  • Improved HttpProcessor to include the response body in the error message:
job.onAny(async (event, data) => {
    if (event === 'processingError') {
        console.error(data.message); // e.g., 'Request failed with status code 500. Response: {"success":false}'
    }
});