Native App from Snowflake's Marketplace
Last updated
Last updated
This guide illustrates the steps to install the CARTO Analytics Toolbox for Snowflake as a Native App available from the Snowflake's Marketplace.
In order to find the CARTO Analytics Toolbox native app, you need to login to your Snowflake account and use the left panel to find Data Products > Marketplace, and search for "CARTO Analytics Toolbox".
Alternatively, you can directly use this link: https://app.snowflake.com/marketplace/listing/GZT0Z4CM1E9NA/carto-carto-analytics-toolbox
Once there, click on 'Get'. At this point, you can choose between two different options:
Free 30-day trial: This will give you access to the application for 30 days, after which you will loose access to it. If you're going with this option, you can also use a CARTO trial account to get the necessary credentials to setup the application later. You can do so through your Partner Connect portal or signing up at carto.com/signup.
Request full product: A request will be sent to the CARTO team. Once approved (provided that you're a CARTO customer) you will be able to proceed with the installation. You can also request the full product after installing the trial version, using the button Request full product in the Native App's listing.
After the installation is complete, you will be able to access the Native App's by clicking on Open in the app's listing or via the Apps section under Data Products in your Snowflake account. Either of those will get you to the instructions to finalize the installation by running a few SQL commands in the Snowflake console.
This section contains the same explanation and code samples that can be found in the Native App's page in your Snowflake account.
The Native App contains the code necessary to install and configure all functions and procedures in the CARTO Analytics Toolbox. In order to be used, they need to be created first in your database.
For the sake of documenting the process, we'll will assume a database named CARTO
, as well as a schema named CARTO
in that database, also we assume the app to be called CARTO_ANALYTICS_TOOLBOX
. The next guidelines and examples will assume that in order to simplify the onboarding process.
All the database, schema and user can have a different name, but remember to adapt the code snippets accordingly.
CARTO’s Analytics Toolbox for Snowflake uses external lambda functions in Amazon Web Services (AWS) in order to perform requests to our external Location Data Services (LDS) providers for the geocoding and isolines functions in the LDS module.
CARTO provides a specific role to make use of the lambda functions:
arn:aws:iam::000955892807:role/CartoFunctionsRole
Snowflake external functions are required to call the lambda function via an API Gateway. These are the endpoints currently available for CARTO LDS, select the best for your case, depending on proximity to the region of your Snowflake account:
For illustration purposes let’s pick, for example, region us-east-1
; then, the API Gateway end-point would be: https://m0qahrqhei.execute-api.us-east-1.amazonaws.com/production/lds
.
To make the connection between Snowflake and the API Gateway, Snowflake uses an API integration is required. Follow the steps below to create the API integration to be able to use CARTO’s Location Data Services (replacing the API Gateway endpoint with the most suitable one for your Snowflake account):
For this step, a CARTO account is needed.
Once you're logged in, go to the 'Developers' section, where you will find your API Base URL and will be able to create an API Access Token. Make sure that LDS API is allowed for your token.
Once you have collected the four needed configuration parameters explained above, we can proceed and configure Location Data Services in your Analytics Toolbox instalaltion, by calling the SETUP procedure, like:
Now, you need to create a CARTO connection to Snowflake. Follow this documentation page to find more information.
Make sure that you open the Advanced options and set the Analytics Toolbox location setting to the database and schema where the functions and procedures of the Native Apps have been installed in the first step above.
Congrats! if everything went well, you should be able to use your CARTO Analytics Toolbox for Snowflake both from
Your Native App gets updated automatically when CARTO release new versions of the Analytics Toolbox.
You can find detailed release notes here. The version that is currently available can be found in your Snowflake account by navigating to Data Products > Apps
However, as mentioned before, that's the version of the installer for the actuall functions and procedures. In order to recreate them with the latest version, you will need to reinstall them with:
AWS Region | Region name | API Gateway |
---|---|---|
United States East (N. Virgina)
us-east-1
Europe (Ireland)
eu-west-1
Asia Pacific (Sydney)
ap-southeast-2
Asia Pacific (Tokyo)
ap-northeast-1