Skip to content

Commit 35afd86

Browse files
author
markzegarelli
authored
Merge branch 'master' into develop
2 parents 2756ad3 + 2fc5647 commit 35afd86

File tree

3 files changed

+35
-43
lines changed

3 files changed

+35
-43
lines changed

src/connections/destinations/catalog/actions-facebook-conversions-api/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Set up your Pixel to work with the Facebook Conversions API (Actions) destinatio
3232
### Option 1: Create a new pixel
3333

3434
1. Go to the [Facebook Business Events Manager](https://www.facebook.com/events_manager/){:target="_blank"} and click **Connect Data Sources**.
35-
2. Choose Web, App, or Offline and then click **Get Started**.
35+
2. Choose "Web" and then click **Get Started**.
3636
3. Select “Conversions API” and then click **Connect**.
3737
4. Choose “Segment” from the list of partners.
3838
5. Enable the setting to “Authorize Segment Connection” and then click **Continue**.

src/connections/destinations/catalog/actions-sprig-web/index.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,4 @@ Sprig (Actions) provides the following benefits over the classic Sprig destinati
4646

4747
<!-- If applicable, add information regarding the migration from a classic destination to an Actions-based version below -->
4848

49-
## Migration from the classic Sprig destination
5049

51-
<!-- Include any pertinent information here. -->
52-
53-
To prevent duplicate events being tracked, please disable your existing Sprig destination when you enable Sprig (Actions).
54-
55-
Follow the table below to map your existing Sprig destination configuration to Sprig (Actions).

src/personas/sql-traits.md

Lines changed: 34 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ title: Personas SQL Traits
55

66

77

8-
SQL Traits allow you to import user or account traits from your data warehouse back into Personas to build audiences, or to enhance Segment data that you send to other Destinations.
8+
SQL Traits allow you to import user or account traits from your data warehouse back into Personas to build audiences or to enhance Segment data that you send to other Destinations.
99

1010
SQL Traits are only limited by the data in your warehouse. Because anything you can write a query for can become a SQL Trait, you can add detail to your user and account profiles, resulting in more nuanced personalization.
1111

@@ -17,7 +17,7 @@ This unlocks some interesting possibilities to help you meet your business goals
1717
- To predict a customer's lifetime value (LTV), you can generate a complex query based on demographic and customer data in your warehouse. You can then use that information in a Personas audience to send personalized offers or recommend specific products.
1818
- To inform your outreach efforts, you can use complex queries to build churn or product adoption models.
1919

20-
Check out our [SQL Traits blog post](https://segment.com/blog/sql-traits){:target="_blank"} for more customer case studies.
20+
Check out Segment's [SQL Traits blog post](https://segment.com/blog/sql-traits){:target="_blank"} for more customer case studies.
2121

2222

2323
### Example: Cloud Sources Sync
@@ -27,7 +27,8 @@ SQL Traits allow you to import data from [object cloud sources](/docs/connection
2727
The two examples below show SQL queries you can use to retrieve cloud-source information from your warehouse.
2828

2929
**Salesforce lead import**
30-
If you wanted to import data from the Salesforce leads and contacts table, you can use SQL similar to the following query:
30+
31+
If you want to import data from the Salesforce leads and contacts table, you can use SQL similar to the following query:
3132

3233
```sql
3334
select external_id_c as user_id,
@@ -40,7 +41,7 @@ If you wanted to import data from the Salesforce leads and contacts table, you c
4041

4142
**Has Open Ticket in Zendesk**
4243

43-
This query computes whether a user has an open ticket.
44+
This query computes whether a user has an open ticket:
4445

4546
```sql
4647
select distinct u.external_id as user_id, true as has_open_ticket
@@ -61,32 +62,31 @@ To use SQL Traits, you need the following:
6162

6263
### Step 1. Set up a warehouse source
6364

64-
Segment supports Redshift, Postgres, Snowflake, Azure SQL, and BigQuery as data warehouse sources for SQL Traits. The setup process for BigQuery is a bit different as it _requires_ a service user.
65+
Segment supports Redshift, Postgres, Snowflake, Azure SQL, and BigQuery as data warehouse sources for SQL Traits. Note that the BigQuery setup process _requires_ a service user.
6566

6667
> info "Safeguard your data"
6768
> For any warehouse, we recommend that you create a separate read-only user for building SQL Traits.
6869
6970
#### Redshift, Postgres, Snowflake, Azure SQL Setup
7071

71-
If you don't already have a data warehouse, follow one of the guides here first:
72+
If you don't already have a data warehouse, use one of the following guides to get started:
7273
- [Redshift Getting Started](/docs/connections/storage/catalog/redshift/#getting-started)
7374
- [Postgres Getting Started](/docs/connections/storage/catalog/postgres/#getting-started)
7475
- [Snowflake Getting Started](/docs/connections/storage/catalog/snowflake/#getting-started)
7576
- [Azure SQL Getting Started](/docs/connections/storage/catalog/azuresqldw/#getting-started)
7677

77-
Remember to create a read-only service user!
7878

7979
#### BigQuery Setup
8080

81-
To connect BigQuery to Segment SQL Traits, you must create a service account for Segment to use.
81+
To connect BigQuery to Segment SQL Traits, follow these instructions to create a service account for Segment to use:
8282

8383
1. Navigate to the Google Developers Console.
8484

8585
2. Click the drop down to the left of the search bar and select the project that you want to connect.
8686

8787
![](images/bigquery_setup1.png)
8888

89-
> **Note**: If you don't see the project you want in the menu, click the account switcher in the upper right corner, and check that you're logged in to the right Google account for the project.
89+
> **Note**: If you don't see the project you want in the menu, click the account switcher in the upper right corner, and verify that you're logged in to the right Google account for the project.
9090
9191
3. Click the menu in the upper left and select **IAM & Admin**, then **Service accounts**.
9292

@@ -112,17 +112,15 @@ To connect BigQuery to Segment SQL Traits, you must create a service account for
112112

113113
![](images/bigquery_setup5.png)
114114

115-
A file with the key is saved to your computer. Save this, because you'll need it to set up the warehouse source in the next step.
115+
A file with the key is saved to your computer. Save this; you'll need it to set up the warehouse source in the next step.
116116

117117
![](images/bigquery_setup6.png)
118118

119-
8. Create new BigQuery Warehouse Source in Personas
120-
121-
Now you can create a new BigQuery warehouse source, upload the JSON key you just downloaded, and complete the BigQuery setup
119+
You're now ready to create a new BigQuery warehouse source, upload the JSON key you just downloaded, and complete the BigQuery setup.
122120

123121
### Step 2. Add the warehouse as a Personas Source
124122

125-
Once your warehouse is up and running:
123+
Once your warehouse is up and running, follow these steps:
126124

127125
1. Navigate to the Personas settings (Personas > Settings tab > Warehouse Sources), and click **New Warehouse Source**.
128126

@@ -152,16 +150,16 @@ If you are sending data from [object cloud sources](/docs/connections/sources/#c
152150

153151
<!-- need to actually give a sample here -->
154152

155-
When you're building your query, there are some requirements for the data your query returns.
153+
When you're building your query, keep the following requirements in mind for the data your query returns.
156154

157155
- The query must return a column with a `user_id`, `email`, or `anonymous_id` (or `group_id` for account traits, if you have Personas for B2B enabled).
158-
- It must return at least one additional trait in addition to `user_id`/`group_id`, and no more than 25 total columns
156+
- It must return at least one additional trait in addition to `user_id`/`group_id`, and no more than 25 total columns.
159157
- The query must not return any `user_id`s with a `null` value, or any duplicate `user_id`s.
160158
- The query must not return more than 25 million rows.
161159
- Each record must be less than 16kb in size to adhere to [Segment's maximum request size](/docs/connections/sources/catalog/libraries/server/http-api/#max-request-size).
162160

163161
A successful preview returns a sample of users and their traits.
164-
If Segment recognizes a user already in Personas, it displays a green checkmark on their profile. You can click that user to view the user's profile. If a user has a question mark, Segment hasn't detected this `user_id` in Personas before.
162+
If Segment recognizes a user already in Personas, it displays a green checkmark on their profile. Clicking the checkmark displays the user's profile. If a user has a question mark, Segment hasn't detected this `user_id` in Personas before.
165163

166164
![Click on a user to check out their profile. If a user has a question mark, we haven't seen this user_id in Personas before](images/sql_traits_preview2.png)
167165

@@ -172,14 +170,14 @@ Once you're ready to import the SQL Trait, select the Destinations to which you
172170

173171
![Select destinations](images/sql_traits_connect1.png)
174172

175-
Give your SQL Trait a name. This is used as a label for descriptive purposes. If you're importing multiple Traits, give it a name like "Zendesk Traits". The Trait names you use in audience-building or in your downstream tools correspond to the column names from the query.
173+
Give your SQL Trait a descriptive name. If you're importing multiple Traits, use a name like "Zendesk Traits". The Trait names you use in audience-building or in your downstream tools correspond to the column names from the query.
176174

177175
If you're building Personas audiences from this data, select "Compute without enabled destinations".
178176

179177
Click **Create Computed Trait** to save the Trait.
180178

181179
![](images/sql_traits_connect3.png)
182-
Check **Compute without destinations** if you only want to send to Personas
180+
Check **Compute without destinations** if you only want to send to Personas.
183181

184182
When you create a SQL Trait, Segment runs the query on the warehouse twice a day by default. You can customize the time at which Segment queries the data warehouse and the frequency, up to once per hour, from the SQL Trait's settings.
185183
(If you're interested in a more frequent schedule, [contact Segment Support](https://segment.com/help/contact/){:target="_blank"}.)
@@ -198,25 +196,23 @@ For each row (user or account) in the query result, Personas sends an identify o
198196
}
199197
```
200198

201-
Happy Querying!
202-
203199
## FAQs
204200

205201
### Is there a limit to the result set that can be queried and imported?
206202

207-
The result set is capped at 25 million rows.
203+
Yes. The result set is capped at 25 million rows.
208204

209205
### How often does Segment query the customer's data warehouse?
210206

211207
For each SQL Trait you create, you can set a compute schedule to query the data warehouse up to once per hour. Your query may run at any given time during the hour you select.
212208

213209
### What identifiers can I use to query a list?
214210

215-
You can currently query based on `email`, `user_id` or `anonymous_id`. If Segment doesn't locate a match based on the chosen identifier, it creates a new profile. See more below.
211+
You can query based on `email`, `user_id` or `anonymous_id`. If Segment doesn't locate a match based on the chosen identifier, it creates a new profile. See more below.
216212

217213
### Can I use SQL Traits to create users in Segment? Or do SQL Traits only append Traits to existing users?
218214

219-
Yes. The Personas engine sends an `identify` call if there is no match between the identifier you chose and an existing record. When this happens, Segment creates a new user profile. (This identify call happens in the back-end, and doesn't show up in your Debugger.)
215+
Yes. The Personas engine sends an identify call if there is no match between the identifier you chose and an existing record. When this happens, Segment creates a new user profile. This identify call takes place in the back-end and doesn't show up in your Debugger.
220216

221217
### Does Personas send identify/group calls on every run?
222218

@@ -234,42 +230,44 @@ Yes, Segment limits request sizes to a maximum of 16kb. Records larger than this
234230

235231
### I'm getting a permissions error.
236232

237-
You might encounter a similar permissions error:
233+
You might encounter a `permission denied for schema` error, like the following:
238234
![](images/troubleshoot1.png)
239235

240-
Segment usually displays this error because you're querying a schema and table that the current user cannot access. To check the table privileges for a specific grantee (user), go to [your warehouse source credentials in Personas](https://app.segment.com/goto-my-workspace/personas/settings/warehouse-sources/) to retrieve the user name. To grant access to a table, an admin usually needs to grant access to both a schema and table through the following similar commands:
236+
Segment usually displays this error because you're querying a schema and table that the current user cannot access. To check the table privileges for a specific grantee (user), go to [your warehouse source credentials in Personas](https://app.segment.com/goto-my-workspace/personas/settings/warehouse-sources/) to retrieve the user name.
237+
238+
To grant access to a table, an admin usually needs to grant access to both a schema and table through the following similar commands:
241239

242240
```sql
243241
GRANT USAGE ON SCHEMA ecommerce TO segment_user;
244242
GRANT SELECT ON TABLE ecommerce.users TO segment_user;
245243
```
246244

247-
Learn more about granting permissions:
248-
- https://www.postgresql.org/docs/9.0/sql-grant.html
249-
- https://stackoverflow.com/questions/17338621/what-grant-usage-on-schema-exactly-do
245+
Learn more about granting permissions using the following links:
246+
- [PostgreSQL Grants](https://www.postgresql.org/docs/current/sql-grant.html){:target="_blank"}
247+
- [What does 'Grant usage on schema' do?](https://stackoverflow.com/questions/17338621/what-grant-usage-on-schema-exactly-do){:target="_blank"}
250248

251249
### I'm seeing a maximum columns error.
252250

253251
![](images/troubleshoot2.png)
254252

255-
Segment currently supports returning only 25 columns. [Contact us](https://segment.com/help/contact/) with a description of your use case if you need to access more.
253+
Segment supports returning only 25 columns. [Contact us](https://segment.com/help/contact/) with a description of your use case if you need access to more than 25 columns.
256254

257255
### I'm seeing a duplicate `user_id` error.
258256

259257
![](images/troubleshoot3.png)
260258

261259
Each query row must correspond to a unique user. Segment displays this error if it detects multiple rows with the same `user_id`. Use a `distinct` or `group by` statement to ensure that each row has a unique user_id.
262260

263-
### I'm seeing some users/accounts in my preview with questions marks. What does that mean?
261+
### I'm seeing some users/accounts in my preview with question marks. What does that mean?
264262

265-
This could mean one of two things:
263+
Question marks in previews indicate one of two things:
266264

267-
**1. Segment doesn't recognize this `user_id`/`group_id` in Personas**
265+
**1. Segment doesn't recognize this `user_id`/`group_id` in Personas.**
268266

269-
This means for the [sources connected to Personas](https://app.segment.com/goto-my-workspace/personas/settings/sources) Segment has not received any event (identify, track, page etc) with this `user_id`. This could still be a legitimate `user_id` for a number of reasons, but before syncing, make sure you rule out option 2 (below) as sending a different identifier as the `user_id` can corrupt your identity graph.
267+
In this case, for [sources connected to Personas](https://app.segment.com/goto-my-workspace/personas/settings/sources), Segment has not received any event (identify, track, page etc) with this `user_id`. This could still be a legitimate `user_id` for a number of reasons, but before syncing, make sure you rule out option two (below), as sending a different identifier as the `user_id` can corrupt your identity graph.
270268

271-
**2. You have the wrong `user_id` column**
269+
**2. You have the wrong `user_id` column.**
272270

273-
You might be returning a value for `user_id` that is inconsistent with how you track `user_id` elsewhere. Some customers want to return `email` as the `user_id`, or a partner's tool id as the `user_id`. These conflict with Segment best practices and corrupt the identity graph if you then track `user_id` differently elsewhere in your apps.
271+
You might be returning a value for `user_id` that is inconsistent with how you track `user_id` elsewhere. Some customers want to return `email` as the `user_id`, or a partner's tool ID as the `user_id`. These conflict with Segment best practices and corrupt the identity graph if you then track `user_id` differently elsewhere in your apps.
274272

275273
If you see only question marks in the preview, and have already tracked data historically with Segment, then you likely have the wrong column. If your cloud source doesn't have the database `user_id`, we recommend using a `JOIN` clause with an internal users table before sending the results back to Segment.

0 commit comments

Comments
 (0)