Setup Snowflake Secure Data Share

If you use the Snowflake Data Warehouse to house data that you'd like to use with NinjaCat, we support moving data into our system using a Snowflake Secure Data Share.  This article is a basic overview of the steps to set up and use the Snowflake Secure Data Share.

If you are a current Snowflake customer and have data you'd like to use with NinjaCat, we support importing data through the use of Snowflake Data Sharing.

Snowflake allows private data sharing through two different mechanisms: Direct Shares or Private Marketplace Listings.

Note: Prior to sharing any data with NinjaCat over Snowflake share, make sure that any PII or sensitive content has either been excluded or masked.


Direct Shares

Direct shares are simple to create and manage, through either the Snowsight user interface or directly using SQL. However, they require that your account be in the same cloud platform and region as NinjaCat (AWS us-east-1/N Virginia).


Private Marketplace Listings

A Listing is essentially a wrapper around a data share, where Snowflake will take care of all the infrastructure required to deliver data across regions, removing the limitations of requiring your account to be in the same AWS region as NinjaCat.

Note: At this time, NinjaCat does not support cross-cloud data sharing through Listings. Please contact your NinjaCat account contact if you are not on an AWS hosted Snowflake account.


Creating a Snowflake Direct Share (Using Snowsight)

  1. Customer must create a Direct Share in the account where their data resides.

    Note: In order to perform this process you must have ACCOUNTADMIN permissions, or set up an appropriate role to be able to manage shares.

  2. Log into your Snowflake account where data resides

  3. Set your current role to "ACCOUNTADMIN"

  1. From the main menu, select Data SharingPrivate Sharing
  1. Add the tables, views, secure views to the share

  1. After creating your Share, contact NinjaCat via the in-app Support Bot and let us know the name of the share. Our support staff will accept the share and complete the internal tasks required for you to set up the Snowflake Share or Snowflake Direct data connectors.

Creating a Private Listing

  1. Log in and set your role appropriately
  2. From the main menu, select Data SharingPrivate Sharing
  1. Select "Publish to Specified Customers"
  2. Give your Listing an identifying name so it can be identified by us
  1. Select the "Add Data Product" button and add the objects you want to share with us. After saving your selection, you will name the underlying data Share that is wrapped by the Listing
  1. You will be returned to the listing page after saving. Set the Access Type to "Free listing"
  1. Update the "Who can access" block, and add our share ID to the listing: GZ07529.NC10487

Note: Once created, private listings can be found under Data SharingProvider Studio

  1. After creating your Share, contact NinjaCat via the in-app Support Bot and let us know the name of the share. Our support staff will accept the share and complete the internal tasks required for you to set up the Snowflake Share or Snowflake Direct data connectors.

Notes on Secure Views

Private sharing supports adding tables, views, or secure views.


Creating Shares with SQL

Creating Direct Shares with SQL is simple as well. Snowflake provides a great guide on how to complete this task.

If you need cross-region sharing, a direct share can be converted to a private listing.


Create a Snowflake Share Data Source

1. Go to the Setup Settings

2. Follow the instructions in the article Add a Native Data Source, selecting "Snowflake Share" as the desired network

 

Creating a Snowflake Share Mapping

1. Go to the Setup Settings

2. Select the new Snowflake Share Network you just created in the previous steps

cssm01.png

3. Click on "Edit Mapping" under the "More Actions" menu near the top right

cssm02.png

4. Click on the "Add Mapping" button near the center

cssm03.png

5. FILL IN THE NEEDED INFORMATION IN EACH OF THE REQUIRED TABS

  1. SETTINGS Tab -- NinjaNote: This tab and the "Advanced" tab are the only tabs visible until you successfully query data from the Snowflake Share Database
  • Name Identifier - Type a unique identifier that is used to find this mapping in the NinjaCat Template Builder
  • Query - Type in a SQL query you want to execute in order to define the data set to connect to
  • Click the "Connect" button near the bottom right

4.png

5.png

📘

After the query successfully connects to a data set, several new configuration tabs become visible. Also, the "Connect" button changes to a "Save" button near the bottom left. DON'T CLICK IT YET! You must follow the instructions to create at least one Dimension and one Metric in this Mapping before clicking Save. That button is the final step in creating the Mapping NOT an incremental "save" step.

  1. FILTERING Tab
  • Date Column - Unless designated by the query, use this drop-down to select the column from the data set that contains the date value
  • Non-Aliased Date Column - In the field enter the non-aliased column name within your query that references the date value within the data
  • Account Matching - Use the drop-down to select how you want to match your accounts to the data
    • NinjaCat ID: Matches by the ID found in the edit account screen or the accounts export
    • Account Name: Matches by the name of the account
    • External ID: Matches by the External ID value you provided in Account Settings
      If not provided then no account filtering will be used
  • Account Column - Use the drop-down to select which column in your query holds the value for the Account (in the Account Matching above) within the data. If not provided then no account filtering will be used.

6.png

📘

There are two options for filtering your mapping to Advertiser/Account/Client specific data:

If there is a column in your Snowflake data table that allows for Advertiser/Account/Client specification of your data, you can use the account matching described above
If there are no Advertiser/Account/Client filtering options inside the table you MUST connect the mapping itself to an Advertiser/Account/Client by following the instructions in this article's section Connecting a Snowflake Share Network to a NinjaCat Account

  1. DIMENSIONS Tab -- Repeat the instructions below for each dimension you need to pull from your data set
  • Click the "Add Dimensions" button near the center or top right

7.png

  • Fill in the needed fields in the "Dimension Editor" pop-up window
    • Name - A title for the Dimension that will be visible in the Template Builder
    • Header Mapping - Select the actual column from your sheet that contains the right data for the Dimension
    • Aggregation Mapping - (If appropriate) The common Dimension set that this data could fall under if being combined with data from other data sources
    • Display As - The specific format that the data from the sheet should be represented as
  • Click the "OK" button near the bottom right of the pop-up window after all the fields are filled

8.png

  1. METRICS Tab -- Repeat the instructions below for each metric you need to pull from your data set
  • Click the "Add Metrics" button near the center or top right

9.png

  • Fill in the needed fields in the "Metrics Editor" pop-up window
    • Name - A title for the Metric that will be visible in the Template Builder
    • Header Mapping - Select the actual column from your sheet that contains the right data for the Metric
    • Display As - The specific numeric format that the data from the sheet should be represented as
    • Calculate totals as... - For combining metric values choose Summation or Average
    • Aggregation Mapping - (If appropriate) The common Metric set that this data could fall under if being combined with data from other data sources
  • Click the "OK" button near the bottom right of the pop-up window after all the fields are filled

10.png

  1. ADVANCED Tab
  • Refresh Type - Select whether data should be refreshed using the connection default, once a day, or multiple times a day. The connection default is once at midnight UTC.

11.png

  1. BACKFILL Tab
  • Save and Start Backfill - Click the button to save and begin the backfilling of your data into our data warehouse

12.png

 

Connecting Snowflake Share to a NinjaCat Account

1. Click on "Accounts" in the Top Navigation

2. Click on the desired account in the Account list

5_6.png

3. In the Account Command Center click on the plus "+" near the top right of the card labeled "Data Sources"

6_7.png

4. Select "Snowflake Share" from the list

2.png

5. Select the desired Snow Flake Network from the first drop-down menu

2.png

6. Type a unique description in the "Description" field then click the "Advanced" tab near the top left

7. Select the desired Snowflake Share mapping from the drop-down menu

4.png

8. Click the "Connect" button near the bottom left

 

Using Snowflake Share Data in a Template

1. Access the Ninjacat Template Builder

2. Add a data widget to the template

3. Click on "+" next to Data Source near the top right

6.png

4. Click on "Snowflake Share" from the list of data sources

8.png

5. Select the desired Mapping from the field labeled "Mapping - Select a Mapping" in the "Snowflake Share" pop-up window

9.png

6. Click the "Save" button near the bottom right of the pop-up window

7. Continue to style, filter, and further configure the widget to suit your display needs

📘

Once a mapping is selected in the pop-up window, two buttons will now be available below the "Mapping" field. The "View Mapping" button will give you a view of the Dimensions and Metrics available through the Mapping. The "Edit Mapping" button will take you to the Edit Mappings area and allow you to make changes to the Mapping itself. When done you will be returned to the NinjaCat Template builder.