Skip to content

Commit 631ddbb

Browse files
committed
apply suggestions from code review
1 parent 357df13 commit 631ddbb

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

src/engage/user-subscriptions/subscription-sql.md

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ You can sync with SQL from two locations in the Segment app. Navigate to **Profi
3333
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.
3434

3535
> success ""
36-
> Reset your SQL query by clicking **Reset Template**.
36+
> Click **Reset Template** to reset your SQL query.
3737
3838
Queries must return at least one pair of the columns below with a value of `subscribed`, `unsubscribed`, or `did_not_subscribe`:
3939
- `email` and `_segment_internal_email_subscription_`
@@ -45,7 +45,7 @@ For more subscription SQL best practices, view the [query requirements](#query-r
4545

4646
Once you write your SQL query, click **Select warehouse** from the Configure screen to select the data warehouse you'd like to query.
4747

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.
4949

5050
### Schedule sync intervals
5151

@@ -72,12 +72,17 @@ From the Update History page, you can view details for each SQL job including th
7272

7373
## Query requirements
7474

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.
7676

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.
88+
- Return more than 25 million rows.

0 commit comments

Comments
 (0)