Skip to content

Use account-level SQL traits to associate users to the account #5604

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

Merged
merged 4 commits into from
Dec 27, 2023

Conversation

Panandhan22
Copy link
Contributor

Use account-level SQL traits to associate users to the account

To associate users to an account via SQL traits, we have to return both group_id and user_id in the account level SQL trait - this will fire a group call with the userId and the groupId in question, which is the method that Segment uses to add users to groups in destinations.

There is a limitation on Segment end when a group (account) contains more than one user, the query will return duplicate group_ids (mapped to unique user_ids). Segment won't allow us to return duplicate group_id's in the Group(account level) SQL trait., So we can't map the users to the accounts on many-to-many situation.

Merge timing

Related issues (optional)

@Panandhan22 Panandhan22 marked this pull request as ready for review November 20, 2023 03:19
@rchinn1 rchinn1 merged commit 6f877fb into develop Dec 27, 2023
@rchinn1 rchinn1 deleted the Panandhan22-patch-5 branch December 27, 2023 19:43
Copy link
Contributor

Thank you for your contribution! Your pull request is merged, but may take a day or two to appear on the site.

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

Successfully merging this pull request may close these issues.

2 participants