From 7513f921994ad426bc1deb326013d53f64085a63 Mon Sep 17 00:00:00 2001 From: Colleen Kerr <73489094+colleenkerr@users.noreply.github.com> Date: Mon, 20 Mar 2023 09:43:20 -0400 Subject: [PATCH 1/5] Update overview.md Add support for id types --- .../user_data_collection/cloud_ingestion/overview.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/_docs/_user_guide/data_and_analytics/user_data_collection/cloud_ingestion/overview.md b/_docs/_user_guide/data_and_analytics/user_data_collection/cloud_ingestion/overview.md index 5ba79fb5527..83d3a34a3f7 100644 --- a/_docs/_user_guide/data_and_analytics/user_data_collection/cloud_ingestion/overview.md +++ b/_docs/_user_guide/data_and_analytics/user_data_collection/cloud_ingestion/overview.md @@ -23,6 +23,10 @@ With Braze Cloud Data Ingestion, you set up an integration between your data war When a sync runs, Braze will directly connect to your data warehouse instance, retrieve all new data from the specified table, and update the corresponding user profiles on your Braze dashboard. Each time the sync runs, any updated data will be reflected on the user profiles. +### Supported data types + +Sync user attributes, custom events, and purchases through Cloud Data Ingestion. Data for a user can be updated by External ID, User Alias, or Braze ID. + ### What gets synced Each time a sync runs, Braze looks for rows that have not previously been synced. We check this using the `UPDATED_AT` column in your table or view. Any rows where `UPDATED_AT` is later than the last synced row will be selected and pulled into Braze. @@ -139,4 +143,4 @@ We have a public [GitHub repository](https://github.com/braze-inc/braze-examples | Snowflake region | You can connect your Snowflake instance in any region or cloud to Braze using this product. | {: .reset-td-br-1 .reset-td-br-2} -

\ No newline at end of file +

From 02254f566bcbcb3ef295a9575c6990b4d0dbb126 Mon Sep 17 00:00:00 2001 From: Colleen Kerr <73489094+colleenkerr@users.noreply.github.com> Date: Mon, 20 Mar 2023 10:02:20 -0400 Subject: [PATCH 2/5] Update redshift.md --- .../user_data_collection/cloud_ingestion/redshift.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/_docs/_user_guide/data_and_analytics/user_data_collection/cloud_ingestion/redshift.md b/_docs/_user_guide/data_and_analytics/user_data_collection/cloud_ingestion/redshift.md index 4d0741f2a36..1b6779dd77e 100644 --- a/_docs/_user_guide/data_and_analytics/user_data_collection/cloud_ingestion/redshift.md +++ b/_docs/_user_guide/data_and_analytics/user_data_collection/cloud_ingestion/redshift.md @@ -34,7 +34,13 @@ Create a table (or view) to use for your CDI integration ```json CREATE TABLE BRAZE_CLOUD_PRODUCTION.INGESTION.USERS_ATTRIBUTES_SYNC ( updated_at timestamptz default sysdate, + --at least one of external_id, alias_name and alias_label, or braze_id is required external_id varchar, + --if using user alias, both alias_name and alias_label are required + alias_label varchar, + alias_name varchar, + --braze_id can only be used to update existing users created through the Braze SDK + braze_id varchar, payload varchar(max) ) ``` @@ -42,7 +48,10 @@ CREATE TABLE BRAZE_CLOUD_PRODUCTION.INGESTION.USERS_ATTRIBUTES_SYNC ( You can name the database, schema, and table as you'd like, but the column names should match the preceding definition. - `UPDATED_AT` - The time this row was updated in or added to the table. We will only sync rows that have been added or updated since the last sync. -- `EXTERNAL_ID` - This identifies the user you want to update. This should match the `external_id` value used in Braze. +- User identifier columns. Your table may contain one or more user identifier columns. Each row should only contain one identifier (either `external_id`, the combination of `alias_name` and `alias_label`, or `braze_id`. A source table may columns for one, two, or all three identifier types. + - `EXTERNAL_ID` - This identifies the user you want to update. This should match the `external_id` value used in Braze. + - `ALIAS_NAME` and `ALIAS_LABEL` - these two columns together create a user alias object. `alias_name` should be a unique identifier, and `alias_label` specifies the type of alias. Users may have multiple aliases with different labels, but only one `alias_name` per `alias_label`. + - `BRAZE_ID` - the Braze user identifier. This is genereated by the Braze SDK and new users cannot be created using a Braze ID through Cloud Data Ingestion. To create new users, specify an External User ID or User Alias. - `PAYLOAD` - This is a JSON string of the fields you want to sync to the user in Braze. #### Step 2: Create User and grant permissions From 149ff6241213de7f84595bb5dab893e9d1dcb220 Mon Sep 17 00:00:00 2001 From: Colleen Kerr <73489094+colleenkerr@users.noreply.github.com> Date: Mon, 20 Mar 2023 10:05:41 -0400 Subject: [PATCH 3/5] add support for user alias and braze_id --- .../cloud_ingestion/snowflake.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/_docs/_user_guide/data_and_analytics/user_data_collection/cloud_ingestion/snowflake.md b/_docs/_user_guide/data_and_analytics/user_data_collection/cloud_ingestion/snowflake.md index 04cd984190e..45ea11c0d42 100644 --- a/_docs/_user_guide/data_and_analytics/user_data_collection/cloud_ingestion/snowflake.md +++ b/_docs/_user_guide/data_and_analytics/user_data_collection/cloud_ingestion/snowflake.md @@ -26,7 +26,13 @@ CREATE DATABASE BRAZE_CLOUD_PRODUCTION; CREATE SCHEMA BRAZE_CLOUD_PRODUCTION.INGESTION; CREATE OR REPLACE TABLE BRAZE_CLOUD_PRODUCTION.INGESTION.USERS_ATTRIBUTES_SYNC ( UPDATED_AT TIMESTAMP_NTZ(9) NOT NULL DEFAULT SYSDATE(), - EXTERNAL_ID VARCHAR(16777216) NOT NULL, + --at least one of external_id, alias_name and alias_label, or braze_id is required + EXTERNAL_ID VARCHAR(16777216), + --if using user alias, both alias_name and alias_label are required + ALIAS_LABEL VARCHAR(16777216), + ALIAS_NAME VARCHAR(16777216), + --braze_id can only be used to update existing users created through the Braze SDK + BRAZE_ID VARCHAR(16777216), PAYLOAD VARCHAR(16777216) NOT NULL ); ``` @@ -34,7 +40,10 @@ CREATE OR REPLACE TABLE BRAZE_CLOUD_PRODUCTION.INGESTION.USERS_ATTRIBUTES_SYNC ( You can name the database, schema, and table as you'd like, but the column names should match the preceding definition. - `UPDATED_AT` - The time this row was updated in or added to the table. We will only sync rows that have been added or updated since the last sync. -- `EXTERNAL_ID` - This identifies the user you want to update. This should match the `external_id` value used in Braze. +- User identifier columns. Your table may contain one or more user identifier columns. Each row should only contain one identifier (either `external_id`, the combination of `alias_name` and `alias_label`, or `braze_id`. A source table may columns for one, two, or all three identifier types. + - `EXTERNAL_ID` - This identifies the user you want to update. This should match the `external_id` value used in Braze. + - `ALIAS_NAME` and `ALIAS_LABEL` - these two columns together create a user alias object. `alias_name` should be a unique identifier, and `alias_label` specifies the type of alias. Users may have multiple aliases with different labels, but only one `alias_name` per `alias_label`. + - `BRAZE_ID` - the Braze user identifier. This is genereated by the Braze SDK and new users cannot be created using a Braze ID through Cloud Data Ingestion. To create new users, specify an External User ID or User Alias. - `PAYLOAD` - This is a JSON string of the fields you want to sync to the user in Braze. #### Step 2: Set up the role and database permissions From 14459bd34400174713c8d7beaf4525599bc7574b Mon Sep 17 00:00:00 2001 From: KellieHawks Date: Tue, 21 Mar 2023 10:19:50 -0400 Subject: [PATCH 4/5] Apply suggestions from code review --- .../user_data_collection/cloud_ingestion/overview.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_docs/_user_guide/data_and_analytics/user_data_collection/cloud_ingestion/overview.md b/_docs/_user_guide/data_and_analytics/user_data_collection/cloud_ingestion/overview.md index 83d3a34a3f7..b30e964e9bc 100644 --- a/_docs/_user_guide/data_and_analytics/user_data_collection/cloud_ingestion/overview.md +++ b/_docs/_user_guide/data_and_analytics/user_data_collection/cloud_ingestion/overview.md @@ -25,7 +25,7 @@ When a sync runs, Braze will directly connect to your data warehouse instance, r ### Supported data types -Sync user attributes, custom events, and purchases through Cloud Data Ingestion. Data for a user can be updated by External ID, User Alias, or Braze ID. +Sync user attributes, custom events, and purchases through Cloud Data Ingestion. Data for a user can be updated by external ID, user alias, or Braze ID. ### What gets synced From 9be40bc836401b7238aa5fe72d06d148a76b0f75 Mon Sep 17 00:00:00 2001 From: KellieHawks Date: Tue, 21 Mar 2023 10:20:11 -0400 Subject: [PATCH 5/5] Apply suggestions from code review --- .../user_data_collection/cloud_ingestion/redshift.md | 4 ++-- .../user_data_collection/cloud_ingestion/snowflake.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/_docs/_user_guide/data_and_analytics/user_data_collection/cloud_ingestion/redshift.md b/_docs/_user_guide/data_and_analytics/user_data_collection/cloud_ingestion/redshift.md index 1b6779dd77e..c9d4f61bfa1 100644 --- a/_docs/_user_guide/data_and_analytics/user_data_collection/cloud_ingestion/redshift.md +++ b/_docs/_user_guide/data_and_analytics/user_data_collection/cloud_ingestion/redshift.md @@ -50,8 +50,8 @@ You can name the database, schema, and table as you'd like, but the column names - `UPDATED_AT` - The time this row was updated in or added to the table. We will only sync rows that have been added or updated since the last sync. - User identifier columns. Your table may contain one or more user identifier columns. Each row should only contain one identifier (either `external_id`, the combination of `alias_name` and `alias_label`, or `braze_id`. A source table may columns for one, two, or all three identifier types. - `EXTERNAL_ID` - This identifies the user you want to update. This should match the `external_id` value used in Braze. - - `ALIAS_NAME` and `ALIAS_LABEL` - these two columns together create a user alias object. `alias_name` should be a unique identifier, and `alias_label` specifies the type of alias. Users may have multiple aliases with different labels, but only one `alias_name` per `alias_label`. - - `BRAZE_ID` - the Braze user identifier. This is genereated by the Braze SDK and new users cannot be created using a Braze ID through Cloud Data Ingestion. To create new users, specify an External User ID or User Alias. + - `ALIAS_NAME` and `ALIAS_LABEL` - These two columns create a user alias object. `alias_name` should be a unique identifier, and `alias_label` specifies the type of alias. Users may have multiple aliases with different labels but only one `alias_name` per `alias_label`. + - `BRAZE_ID` - The Braze user identifier. This is generated by the Braze SDK and new users cannot be created using a Braze ID through Cloud Data Ingestion. To create new users, specify an external user ID or user alias. - `PAYLOAD` - This is a JSON string of the fields you want to sync to the user in Braze. #### Step 2: Create User and grant permissions diff --git a/_docs/_user_guide/data_and_analytics/user_data_collection/cloud_ingestion/snowflake.md b/_docs/_user_guide/data_and_analytics/user_data_collection/cloud_ingestion/snowflake.md index 45ea11c0d42..5d9f9e88c83 100644 --- a/_docs/_user_guide/data_and_analytics/user_data_collection/cloud_ingestion/snowflake.md +++ b/_docs/_user_guide/data_and_analytics/user_data_collection/cloud_ingestion/snowflake.md @@ -42,8 +42,8 @@ You can name the database, schema, and table as you'd like, but the column names - `UPDATED_AT` - The time this row was updated in or added to the table. We will only sync rows that have been added or updated since the last sync. - User identifier columns. Your table may contain one or more user identifier columns. Each row should only contain one identifier (either `external_id`, the combination of `alias_name` and `alias_label`, or `braze_id`. A source table may columns for one, two, or all three identifier types. - `EXTERNAL_ID` - This identifies the user you want to update. This should match the `external_id` value used in Braze. - - `ALIAS_NAME` and `ALIAS_LABEL` - these two columns together create a user alias object. `alias_name` should be a unique identifier, and `alias_label` specifies the type of alias. Users may have multiple aliases with different labels, but only one `alias_name` per `alias_label`. - - `BRAZE_ID` - the Braze user identifier. This is genereated by the Braze SDK and new users cannot be created using a Braze ID through Cloud Data Ingestion. To create new users, specify an External User ID or User Alias. + - `ALIAS_NAME` and `ALIAS_LABEL` - These two columns create a user alias object. `alias_name` should be a unique identifier, and `alias_label` specifies the type of alias. Users may have multiple aliases with different labels but only one `alias_name` per `alias_label`. + - `BRAZE_ID` - The Braze user identifier. This is generated by the Braze SDK and new users cannot be created using a Braze ID through Cloud Data Ingestion. To create new users, specify an external user ID or user alias. - `PAYLOAD` - This is a JSON string of the fields you want to sync to the user in Braze. #### Step 2: Set up the role and database permissions