You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/engage/user-subscriptions/subscription-sql.md
+15-10Lines changed: 15 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,7 @@ You can sync with SQL from two locations in the Segment app. Navigate to **Profi
33
33
To configure Subscriptions with SQL Traits, you can write your own query or click **Use Template** to use one of the templates Engage provides. For any new users that your query returns, Engage adds a new profile.
34
34
35
35
> success ""
36
-
> Reset your SQL query by clicking **Reset Template**.
36
+
> Click **Reset Template** to reset your SQL query.
37
37
38
38
Queries must return at least one pair of the columns below with a value of `subscribed`, `unsubscribed`, or `did_not_subscribe`:
39
39
-`email` and `_segment_internal_email_subscription_`
@@ -45,7 +45,7 @@ For more subscription SQL best practices, view the [query requirements](#query-r
45
45
46
46
Once you write your SQL query, click **Select warehouse** from the Configure screen to select the data warehouse you'd like to query.
47
47
48
-
Before you schedule your sync intervals, click **Preview** to preview and validate your results. To see subscription statuses for a particular profile, select a user row, then select the Identities tab.
48
+
Before you schedule your sync intervals, click **Preview** to preview a subset of data and validate your results. To see subscription statuses for a particular profile, select a user row, then select the Identities tab.
49
49
50
50
### Schedule sync intervals
51
51
@@ -72,12 +72,17 @@ From the Update History page, you can view details for each SQL job including th
72
72
73
73
## Query requirements
74
74
75
-
When you build your SQL query, keep the following requirements in mind for the data your query returns:
75
+
When you build your SQL query, keep the following requirements in mind for the data your query returns.
76
76
77
-
- The query must return at least one column with `user_id`, `anonymous_id`, `email`, `phone` (or `group_id` for account traits if Profiles for B2B is enabled).
78
-
- The query must not include values for both `user_id` and `anonymous_id` for a given record.
79
-
- The query must not return any `user_id`s, `anonymous_id`s, or `group_id`s with a `null` value.
80
-
- The query must not return any records with duplicate `user_id`s.
81
-
- The query must not return duplicate `email` or `phone` records that have different subscription statuses.
82
-
- The query must not return more than 25 million rows.
83
-
- Each record must be less than 16KB in size.
77
+
**Your query must:**
78
+
79
+
- Return at least one column with `user_id`, `anonymous_id`, `email`, `phone` (or `group_id` for account traits if Profiles for B2B is enabled).
80
+
- Return records less than 16KB in size.
81
+
82
+
**Your query must not:**
83
+
84
+
- Include values for both `user_id` and `anonymous_id` for a given record.
85
+
- Return any `user_id`s, `anonymous_id`s, or `group_id`s with a `null` value.
86
+
- Return any records with duplicate `user_id`s.
87
+
- Return duplicate `email` or `phone` records that have different subscription statuses.
0 commit comments