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
+5-6Lines changed: 5 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,16 +1,16 @@
1
1
---
2
-
title: Subscription SQL Sync
2
+
title: Subscription with SQL Traits
3
3
plan: engage-foundations
4
4
beta: true
5
5
---
6
6
7
-
With Subscription SQL Sync, connect to your data warehouse and query user subscription data to Engage on a scheduled basis. Use your data warehouse as a single source of truth for subscription statuses and query from warehouses such as BigQuery, Redshift, or Snowflake.
7
+
Use Subscription with SQL Traits to connect to your data warehouse and query user subscription data to Engage on a scheduled basis. Use your data warehouse as a single source of truth for subscription statuses and query from warehouses such as BigQuery, Redshift, or Snowflake.
8
8
9
9
On this page, you'll learn how to use SQL to sync subscription data from your warehouse to Engage.
10
10
11
11
## Getting started
12
12
13
-
To use Subscription SQL Sync, you need the following:
13
+
To use Subscription with SQL Traits, you need the following:
14
14
- A warehouse connected to Segment
15
15
- A Segment workspace
16
16
- A user account with access to Engage in that workspace
@@ -36,8 +36,8 @@ To configure subscription SQL, you can write your own query or click **Use Templ
36
36
> Reset your SQL query by clicking **Reset Template**.
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
-
-`email` and `segment_internal_email_subscription`
40
-
-`phone` and `segment_internal_sms_subscription`
39
+
-`email` and `_segment_internal_email_subscription_`
40
+
-`phone` and `_segment_internal_sms_subscription_`
41
41
42
42
For more subscription SQL best practices, view the [query requirements](#query-requirements) below.
43
43
@@ -75,7 +75,6 @@ From the Update History page you can view details for each SQL job including the
75
75
When you build your SQL query, keep the following requirements in mind for the data your query returns:
76
76
77
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 can't return more than 25 total columns.
79
78
- The query must not include values for both `user_id` and `anonymous_id` for a given record.
80
79
- The query must not return any `user_id`s, `anonymous_id`s, or `group_id`s with a `null` value.
81
80
- The query must not return any records with duplicate `user_id`s.
0 commit comments