Snowflake Table Integration
This guide provides a step-by-step walkthrough for using Similarweb’s Batch API to create a Snowflake integration, manage tables, and efficiently extract data.
1
Create a new Snowflake connection
Start by creating a new Snowflake integration to store and access data. You'll need to provide your snowflake_account_id and snowflake_region
"snowflake_account_id": "XXXXX",
"snowflake_region": "AWS_EU_NORTH_1"
--url https://api.similarweb.com/batch/v5/snowflake/setup \
2
Generate a report using 'create table' url
Creating a table is similar to requesting a one-time report, but this time, you will modify the delivery information and use the create-table URL. This step allows you to set up a table to store data continuously.
--url https://api.similarweb.com/batch/v5/integration/create-table \
3
Modify delivery information
Adjust the delivery_information section to define where and how the data will be delivered. In this case, set the delivery method to snowflake to store the data in your snowflake account.
"delivery_information": {
"delivery_method": "snowflake",
"delivery_method_params": {
"integration_name": "snowflake_default",
"table_name": "test"
4
Specify the integration name
The integration_name parameter should always be set to 'snowflake_default' to direct data to the appropriate integration.
"integration_name": "snowflake_default",
5
Name your table
Provide a unique name for your table. This name will be used to identify and manage the table in Snowflake. Choose a meaningful name that corresponds to the data you will store.
"table_name": "test"
6
Run the request
Once you have filled out the request body, submit the request to create the table. After submitting, the table will be set up in Snowflake, and the requested data will be added to it.
7
Retrieve the table path
Upon successful creation of the table, you will receive a location that represents the Snowflake path where the table data is stored. This path is used to access the stored data.
"share_name": "SSBUYFY.BATCH_API_AWS_US_EAST_1.SIMILARWEB_10000003_SNOWFLAKE_DEFAULT/TEST",
8
Add data to the table
To add more data to the table after it has been created, use the request report URL. This step allows you to append new data to the table.
--url https://api.similarweb.com/batch/v5/request-report \
9
Send data to the table
By specifying the integration name and table name, you can add new data to your existing table. This allows you to keep your data up-to-date with additional information as needed.
"delivery_information": {
"delivery_method": "snowflake",
"delivery_method_params": {
"integration_name": "snowflake_default",
"table_name": "test"
}
10
Note
"delivery_method": "snowflake" "integration_name":"snowflake_default", "table_name": "test" Must be the same as when you created the table
"delivery_information": {
"delivery_method": "snowflake",
"delivery_method_params": {
"integration_name": "snowflake_default",
"table_name": "test"
}
On this page
- Snowflake Table Integration