To integrate Snowflake with Abacus.AI, you need to set up the connector and provide the necessary permissions.
Gather Required Information:
- SNOWFLAKE INSTANCE URL: Click on your account ID, the eight-digit alphanumeric code located at the bottom-left corner of your Snowflake homepage. Then, hover over the resulting pop-up menu to reveal the "copy account URL" button, resembling a paperclip. Your unique URL generally takes this form: https://<domain>.<region>.snowflakecomputing.com
, but may include additional components. This full URL is required for the connection.
- WAREHOUSE: Pick the Snowflake warehouse you wish to connect to. You can find the list of warehouses by using the command SHOW WAREHOUSES
in a Snowflake SQL worksheet. The warehouse is the compute resource in Snowflake.
- DATABASE: Pick the Snowflake database that houses the data you wish to access. You can find the list of databases by using the command SHOW DATABASES
in a Snowflake SQL worksheet. The database is where your data is stored.
- USER: Pick any string for a unique user name to be created specifically for Abacus.AI. "ABACUSAI" is commonly used, but is not required to be the user name. This user will be used to connect to Snowflake.
- LOGIN NAME (OPTIONAL): Enter the login name if it differs from the username. This field is optional and can be left blank if the login name and username are the same.
- ROLE: Pick an existing role or choose any string as a unique name for the role you'd like Abacus.AI to occupy. Abacus.AI will generate a create statement for you to run if the role doesn't yet exist. The role defines the permissions for accessing data.
Access Abacus.AI Connected Services Dashboard:
- Go to the Abacus.AI Connected Services Dashboard. At the top-right of the page, click "Add New Connector" and select "Snowflake".
Enter Snowflake Details:
- Fill out the gathered information into the Snowflake connector window and click Save
.
Run Command in Snowflake:
- You will get a pop-up with instructions to run a command in Snowflake. This command will create the necessary user and role for Abacus.AI.
- Note: You need to have sufficient permissions to create and authorize the user and role - e.g., ACCOUNTADMIN.
Replace Schema Name:
- Replace the string <Enter schema_name here>
in the commands with a schema in your chosen database you wish to allow Abacus.AI to read from.
Execute Command in Snowflake:
- Copy the command from the pop-up and paste it in your Snowflake instance. Use the "Run all" button as shown in the image.
Verify Connector Setup: - Finally, hit the "Verify Now" button below the instructions. After this point, you will have successfully set up a Snowflake connector.
If using Snowflake Share, please follow these setup instructions:
Cloud Region: The cloud region of the source Snowflake account.
Owner Account ID: Click on your account ID, the eight-digit alphanumeric code located at the bottom-left corner of your Snowflake homepage. Then, hover over the resulting pop-up menu to reveal the "copy account identifier" button, resembling two squares.
Share Name: The Secure Share Identifier from step 1.
Access Abacus.AI Connected Services Dashboard:
- Go to the Abacus.AI Connected Services Dashboard. At the top-right of the page, click "Add New Connector" and select "Snowflake". Toggle "(OPTIONAL) USE SNOWFLAKE SHARE" to "Yes".
Enter Snowflake Details:
- Fill out the gathered information into the Snowflake connector window and click Save
.
Run Command in Snowflake:
- You will get a pop-up with instructions with an Account ID to add as a consumer in Snowflake.
Add Consumer:
- Return to your Snowflake Share from step 1.
- On the detail page of the share, next to Shared With, click on "Add Consumers."
- Paste the Account ID from step 5 into the box under "Share With Snowflake Accounts."
- Click "Add"
Verify Connector Setup: - Finally, back in Abacus.AI, hit the "Verify Now" button below the instructions in the Snowflake Configuration. After this point, you will have successfully set up a Snowflake Share connector.
Once the Snowflake connector is set up, you can fetch data to train models in Abacus.AI.
Read from External Service: - Choose "Read from External Service" and select your Snowflake connector under "Connected Application Connectors".
Enter Dataset Details: - Enter the details for the Snowflake dataset you want to use.
Configure Schema Mapping:
- After the dataset is uploaded, configure the schema mapping and proceed to train models with the data.
What happens if the underlying Snowflake table changes its schema after I've already created the dataset?
If this happens just go to the relevant dataset's page in Abacus.AI, and select Create New Dataset Version
Then, on the resulting screen, you can select the columns that you would like to include. Our system will automatically detect the schema change, and if you use 'SELECT *', any changes to the schema will be reflected in the new dataset version.