Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LR: Fix CSV generator to account for all rows #1735

Merged
merged 2 commits into from
Nov 29, 2023

Conversation

sayan-das-in
Copy link
Contributor

@sayan-das-in sayan-das-in commented Nov 21, 2023

Liveramp considers the identifiers present in just the first row to compute CSV Headers, this PR fixes the CSV generation logic to consider all rows while generating CSV headers.

Test payload

[
  {
    audience_key: "aud001",
    delimiter: ",",
    filename: "test_file_name.csv",
    enable_batching: true,
  },
  {
    audience_key: "aud002",
    delimiter: ",",
    unhashed_identifier_data: {
      email: "[email protected]",
    },
    filename: "test_file_name.csv",
    enable_batching: true,
  },
  {
    audience_key: "aud003",
    delimiter: ",",
    unhashed_identifier_data: {
      email: "[email protected]",
      example_identifier: "example-id",
    },
    filename: "test_file_name.csv",
    enable_batching: true,
  },
];

Before the fix
image

After the fix
image

Testing

testing completed successfully via unit tests.

  • Added unit tests for new functionality
  • Tested end-to-end using the local server
  • [Segmenters] Tested in the staging environment

@sayan-das-in sayan-das-in requested a review from a team as a code owner November 21, 2023 04:37
@sayan-das-in sayan-das-in requested a review from a team November 21, 2023 04:37
@joe-ayoub-segment
Copy link
Contributor

Hi @sayan-das-in should this need a Push when deployed?

@sayan-das-in
Copy link
Contributor Author

Hi @joe-ayoub-segment this is an internal logic change and doesn't need a push.

@joe-ayoub-segment joe-ayoub-segment merged commit 593b024 into main Nov 29, 2023
7 checks passed
@joe-ayoub-segment joe-ayoub-segment deleted the lr-audience/fix-csv-headers branch November 29, 2023 11:44
Munter added a commit to bucketco/segment-action-destinations that referenced this pull request Nov 29, 2023
…nation

* segment/main: (59 commits)
  Publish
  attempting to fix breaking buildkite CI
  registering 1flow and jimo web Integrations
  Publish
  create trackEvent and identifyUser browser-destinations for 1flow (segmentio#1703)
  fix(Jimo): resolve when jimo is not an array & remove manualInit from settings (segmentio#1740)
  fix for empty string in setting (segmentio#1734)
  Yahoo audiences 5 (segmentio#1742)
  [STRATCONN] Klaviyo AddToProfileList and RemoveFromProfileList actions with engage setup (segmentio#1723)
  Add updateHandler to Actions DV360 (segmentio#1726)
  Inc-7055 long term fix: add external ids to message tags (segmentio#1744)
  Channels-973: parse text field of action buttons (segmentio#1738)
  LR: Fix CSV generator to account for all rows (segmentio#1735)
  [STRATCONN-3376] Add phone number to TikTok Audiences (segmentio#1730)
  rename full_name to display_name to fix API changes (segmentio#1743)
  adding default paths for click id and cookie (segmentio#1729)
  [Hyperengage] Resolved issue with Timezone Offset and Added Missing user_id field in group call (segmentio#1733)
  adding updated generated types for moengage
  Added key value pair of new regional endpoint (segmentio#1727)
  v3.89.0 (segmentio#1725)
  ...
@joe-ayoub-segment
Copy link
Contributor

Hi @sayan-das-in this PR has been deployed

marinhero pushed a commit that referenced this pull request Nov 30, 2023
* Fixed CSV generator to account for all rows

* Updated CSV processor, tests and snapshots
harsh-joshi99 added a commit that referenced this pull request Dec 6, 2023
commit 12d62f7
Author: Harsh Joshi <[email protected]>
Date:   Wed Dec 6 10:29:30 2023 +0530

    cleanup

commit 3b8b9ed
Author: Harsh Joshi <[email protected]>
Date:   Mon Dec 4 10:36:54 2023 +0530

    Code changes and unit tests

commit 2edb75e
Merge: 8e9e776 ad48899
Author: Harsh Joshi <[email protected]>
Date:   Wed Nov 29 18:01:45 2023 +0530

    Merge branch 'STRATCONN-3399' into klaviyo-add-to-profile-batch

commit 8e9e776
Author: Elena <[email protected]>
Date:   Wed Nov 29 04:02:37 2023 -0800

    Yahoo audiences 5 (#1742)

    * new audience settings, logging

    * mapping change, device type

commit 7b0fe44
Author: Ankit Gupta <[email protected]>
Date:   Wed Nov 29 17:25:49 2023 +0530

    [STRATCONN] Klaviyo AddToProfileList and RemoveFromProfileList actions with engage setup (#1723)

    * AddToProfileList and RemoveFromProfileList action added

    * added new flow of addProfileToList and RemoveProfileFromList actions in klaviyo

    * completed audience setup for klaviyo

    * updated api key field for klaviyo

    * change in remove from list api test cases

    * full audience sync turned off for audience klaviyo

    * changing default path of external_id

    * Removed debug codes

    * code refactored

    * change in addProfile and removeProfile in klaviyo

    * Resolved build error

    * Resolved build error

    * Added buildHeaders function

    * Seperated addProfile and RemoveProfile Functions

    * Added audience desctiption

    * Change error handling of createProfile function

    * Change error handling of createProfile function

    * Modified in addProfileToList Test case

commit 6db1308
Author: Marín Alcaraz <[email protected]>
Date:   Wed Nov 29 03:54:19 2023 -0800

    Add updateHandler to Actions DV360 (#1726)

    * Add updateHandler to Actions DV360

    * Fix tests

    * update yarn.lock

commit ac78bc7
Author: alfrimpong <[email protected]>
Date:   Wed Nov 29 05:50:15 2023 -0600

    Inc-7055 long term fix: add external ids to message tags (#1744)

    * feat: add external id type & value to message tags

    * feat: add test to enforce passthrough

commit 31e207c
Author: alfrimpong <[email protected]>
Date:   Wed Nov 29 05:44:38 2023 -0600

    Channels-973: parse text field of action buttons (#1738)

    * feat: parse merge tags in action button text

    * chore: added unit test

commit 593b024
Author: Sayan Das <[email protected]>
Date:   Wed Nov 29 17:14:02 2023 +0530

    LR: Fix CSV generator to account for all rows (#1735)

    * Fixed CSV generator to account for all rows

    * Updated CSV processor, tests and snapshots

commit ce3c082
Author: maryamsharif <[email protected]>
Date:   Wed Nov 29 03:43:21 2023 -0800

    [STRATCONN-3376] Add phone number to TikTok Audiences (#1730)

    * Add phone number

    * Fix unit tests

    * Hide enable batching field + adjust names

commit 6fc66be
Author: Chris Brown <[email protected]>
Date:   Wed Nov 29 06:42:32 2023 -0500

    rename full_name to display_name to fix API changes (#1743)

    * rename full_name to display_name to fix API changes

    * Update full_name to display_name in tests

commit 10cc239
Author: Joe Ayoub <[email protected]>
Date:   Wed Nov 29 12:42:06 2023 +0100

    adding default paths for click id and cookie (#1729)

commit 5d80f5e
Author: zhadier39 <[email protected]>
Date:   Wed Nov 29 16:41:16 2023 +0500

    [Hyperengage] Resolved issue with Timezone Offset and Added Missing user_id field in group call (#1733)

    * Add unit and integration tests

    * Updated field descriptions for group, identify and track

    * Updated common fields

    * Fix identify function error

    * Added authentication endpoint

    * Revise tests to enable auth

    * Update default paths for groupId.

    * Implement recommended changes from PR #1621

    * Add url field

    * Resolve pathing issues and add tests/checks for first and last name fields

    * Resolve test issues, payload validation error, and correct context default

    * Fix no user_id field in group call and timezone offset bug

    * Add tests for new functionality

    * Delete packages/destination-actions/src/destinations/liveramp-audiences/audienceEnteredSFTP.types.ts

    Remove auto generated types file on liveramp platform

    * Fix ts error with timeZoneName

    ---------

    Co-authored-by: saadhypng <[email protected]>
    Co-authored-by: Saad Ali <[email protected]>

commit ad48899
Author: Harsh Joshi <[email protected]>
Date:   Wed Nov 29 15:54:05 2023 +0530

    Update error handling

commit e9f2370
Author: Harsh Joshi <[email protected]>
Date:   Fri Nov 24 11:42:37 2023 +0530

    Add enable batching

commit a75cedd
Author: Harsh Joshi <[email protected]>
Date:   Fri Nov 24 11:06:45 2023 +0530

    Add performBatch in upsert profile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants