From ba8cc5a927a2aedac1681e9b9f94f9b4b0802854 Mon Sep 17 00:00:00 2001 From: shrouti1507 Date: Mon, 20 May 2024 21:12:57 +0530 Subject: [PATCH] feat: onboard adjust source --- src/v0/sources/adjust/mapping.json | 2 +- src/v0/sources/adjust/transform.js | 8 ++------ test/integrations/sources/adjust/data.ts | 1 + 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/v0/sources/adjust/mapping.json b/src/v0/sources/adjust/mapping.json index 1b2f86ce2e..dcff474a54 100644 --- a/src/v0/sources/adjust/mapping.json +++ b/src/v0/sources/adjust/mapping.json @@ -35,7 +35,7 @@ "sourceKeys": "tracker_name", "destKeys": "properties.tracker_name" }, - { "sourceKeys": "tracker_token", "destKeys": "properties. tracker_token" }, + { "sourceKeys": "tracker_token", "destKeys": "properties.tracker_token" }, { "sourceKeys": "app_name", diff --git a/src/v0/sources/adjust/transform.js b/src/v0/sources/adjust/transform.js index c55bdc7fc5..08cc0b5ed7 100644 --- a/src/v0/sources/adjust/transform.js +++ b/src/v0/sources/adjust/transform.js @@ -1,15 +1,11 @@ const lodash = require('lodash'); const path = require('path'); const fs = require('fs'); -const { - TransformationError, - structuredLogger: logger, - generateUUID, -} = require('@rudderstack/integrations-lib'); +const { TransformationError, structuredLogger: logger } = require('@rudderstack/integrations-lib'); const Message = require('../message'); const { CommonUtils } = require('../../../util/common'); const { excludedFieldList } = require('./config'); -const { extractCustomFields } = require('../../util'); +const { extractCustomFields, generateUUID } = require('../../util'); // ref : https://help.adjust.com/en/article/global-callbacks#general-recommended-placeholders // import mapping json using JSON.parse to preserve object key order diff --git a/test/integrations/sources/adjust/data.ts b/test/integrations/sources/adjust/data.ts index abfaad1889..14f9564183 100644 --- a/test/integrations/sources/adjust/data.ts +++ b/test/integrations/sources/adjust/data.ts @@ -61,6 +61,7 @@ export const data = [ gps_adid: '38400000-8cf0-11bd-b23e-10b96e40000d', tracker_token: 'abc', custom: 'custom', + tracker_name: 'dummy', }, anonymousId: '97fcd7b2-cc24-47d7-b776-057b7b199513', },