Skip to content

Commit

Permalink
Update transform.js
Browse files Browse the repository at this point in the history
  • Loading branch information
anantjain45823 authored Jan 25, 2024
1 parent a799ecb commit 79e6370
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/v0/destinations/hs/transform.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ const {
getDestinationExternalIDInfoForRetl,
} = require('../../util');
const { API_VERSION } = require('./config');
const stats = require('../../../util/stats');
const {
processLegacyIdentify,
processLegacyTrack,
Expand Down Expand Up @@ -88,16 +87,11 @@ const processRouterDest = async (inputs, reqMetadata) => {
try {
if (mappedToDestination && GENERIC_TRUE_VALUES.includes(mappedToDestination?.toString())) {
// retl
// fire metric to get batch size
stats.histogram('hs_retl_batch_size', tempInputs.length, {
destination: 'HUBSPOT',
});

// skip splitting the batches to inserts and updates if object it is an association
if (objectType.toLowerCase() !== 'association') {
propertyMap = await getProperties(destination); // 1 for 100 events
propertyMap = await getProperties(destination);
// get info about existing objects and splitting accordingly.
tempInputs = await splitEventsForCreateUpdate(tempInputs, destination); // 1
tempInputs = await splitEventsForCreateUpdate(tempInputs, destination);
}
} else {
// reduce the no. of calls for properties endpoint
Expand Down

0 comments on commit 79e6370

Please sign in to comment.