As Snowflake is used more and more frequently as the central data warehouse users often find themselves with duplicate copies of customer information in different tables. This guide shows how to use the FullContact for Snowflake Native Application to unify different pieces of customer data using the FullContact PersonID to have a single, accurate view of how the customer is engaging with your brand.
With your install we will provide you some synthetic data that will join to our Identity Graph to allow you to test out the application. By the end of the walkthrough, we're going to show you how several profiles of a fictional customer named Willow Underwood, will now be able to be merged into a single record of that customer. To see a more in depth example with other sample datasets, make sure to check out the YouTube product walkthrough that is a companion to this guide.
ACCOUNTADMIN
roleThe FullContact for Snowflake Native App is available in the Snowflake Marketplace
FullContact Identity Resolution
to find our Identity Resolution application.FC_NATIVE_APP
. This is the app name we use in the SQL queries we provide post installation of the application in a Snowsight worksheet to help you complete the installation.Once installed, there are a few more configuration steps that need to be completed before the FullContact for Snowflake application can function. On the main app page, click the CONFIG tab on the top nav bar to complete these steps.
FC_API_INTEGRATION
from the previous install you may click the Set Existing FC API Integration button and select it from the resulting API integration modal.The API INTEGRATION
is used to check your license key, allowed usage, and report usage summary counts back to FullContact. The app executes natively which means your raw data never leaves Snowflake. We do track aggregate data about your usage against your contract, that data is sent to our backend systems outside of Snowflake.
In order to use the FullContact for Snowflake Application you need a license (API) key. You will generate this key in the FullContact platform, which is outside of Snowflake. Follow these instructions to get your free API Key, you will need this key for the next steps in this guide.
Snowflake Key
in this example)Before we can run Resolve to unify the sample customer data we need to create a semantic view to help the FullContact application understand how to interpret the different columns in the input data. Because the demo input data is owned by the app, additional grants are not required. When using your own input data instead of our demo data, you will need to first grant the app access to your input table as shown below.
GRANT USAGE ON DATABASE YOUR_DB_NAME TO APPLICATION FC_NATIVE_APP;
GRANT USAGE ON SCHEMA YOUR_SCHEMA_NAME.YOUR_INPUT_TABLE_NAME TO APPLICATION FC_NATIVE_APP;
GRANT SELECT, UPDATE ON TABLE YOUR_DB_NAME.YOUR_SCHEMA_NAME.YOUR_INPUT_TABLE_NAME TO APPLICATION FC_NATIVE_APP;
FC_QUICKSTART.INPUT
for our new view.CREATE DATABASE FC_QUICKSTART;
CREATE SCHEMA FC_QUICKSTART.INPUT;
GET_SQL_CREATE_INPUT_VIEW
procedure on a Snowflake worksheet.CALL FC_NATIVE_APP.APP_SCHEMA.GET_SQL_CREATE_INPUT_VIEW(
'FC_NATIVE_APP.SAMPLE_DATA.CUST_JOURNEY_PURCHASE_DEMO', -- input table (fully qualified name)
'FC_QUICKSTART.INPUT.CUST_JOURNEY_PURCHASE_DEMO_VIEW', -- input view to create (fully qualified name)
'RECORD_ID'); -- primary key of your raw input table
-- This view create statement contains predicted aliases for columns based on data in each column.
-- Please review the statement and modify it as needed before using it as input to the RESOLVE stored procedure.
-- Accepted column names for the RESOLVE stored procedure can be found in the documentation linked below.
-- https://docs.fullcontact.com/docs/snowflake-native-resolve
CREATE OR REPLACE VIEW FC_QUICKSTART.INPUT.CUST_JOURNEY_PURCHASE_DEMO_VIEW AS SELECT
RECORD_ID AS RECORD_ID,
FIRST_NAME,
LAST_NAME,
PHONE_NUMBER,
CITY,
PURCHASE_CHANNEL,
ZIP_CODE,
ADDRESS_LINE_1,
ADDRESS_LINE_2,
CUSTOMER_NUMBER,
LIFETIME_VALUE,
EMAIL_1,
STATE
FROM FC_NATIVE_APP.SAMPLE_DATA.CUST_JOURNEY_PURCHASE_DEMO;
GRANT USAGE ON DATABASE FC_QUICKSTART TO APPLICATION FC_NATIVE_APP;
GRANT USAGE ON SCHEMA FC_QUICKSTART.INPUT TO APPLICATION FC_NATIVE_APP;
GRANT SELECT ON VIEW FC_QUICKSTART.INPUT.CUST_JOURNEY_PURCHASE_DEMO_VIEW TO APPLICATION FC_NATIVE_APP;
At this point you should have your semantic view FC_QUICKSTART.INPUT.CUST_JOURNEY_PURCHASE_DEMO_VIEW
created.
These steps are where the magic happens.
We provide some sample data with the application install that you can use for this initial test. Copy, paste and run the following SQL to take the sample data and run it through the FullContact Resolve process (which standardizes it and joins it to the FullContact Identity Graph) and assign Person IDs (PIDs)
RESOLVE
procedure to resolve and assign PersonIds to the input data.-- Call the RESOLVE SPROC to resolve and assign PIDs to sample data
CALL FC_NATIVE_APP.APP_SCHEMA.RESOLVE(
'FC_QUICKSTART.INPUT.CUST_JOURNEY_PURCHASE_DEMO_VIEW', -- semantic input view (fully qualified name)
'CUST_JOURNEY_PURCHASE_DEMO_RESULTS'); -- output table name (table name only)
_IO
to the name you supplied for our native app (in our case FC_NATIVE_APP
) to create the IO database. All resolve runs will output to the schema RESOLVE_OUT
in this IO database. Consequently, the resulting output table for this demo can be found at FC_NATIVE_APP_IO.RESOLVE_OUT.CUST_JOURNEY_PURCHASE_DEMO_RESULTS
.SELECT * FROM FC_NATIVE_APP_IO.RESOLVE_OUT.CUST_JOURNEY_PURCHASE_DEMO_RESULTS LIMIT 10;
SELECT * FROM FC_NATIVE_APP.METRICS.FC_RESOLVE_METRICS;
SELECT * FROM FC_NATIVE_APP_IO.RESOLVE_OUT.CUST_JOURNEY_PURCHASE_DEMO_RESULTS WHERE first_name = 'Willow';
By following this guide you learned how to use the FullContact for Snowflake application to unify disparate customer data through the Fullcontact PersonID. This application reads, standardizes and joins your dataset to the FullContact Identity Graph all without your data leaving the confines of Snowflake or being shared with FullContact.
If you want to learn more about FullContact for Snowflake check out the official documentation or contact an expert to learn more about the different products FullContact offers and how it can help you better connect to your customers.