Set up a Salesforce connection in Snoweaver

Prerequisites

Before continuing with this tutorial, ensure you have completed the following prerequisites:

Create an OAuth integration

  1. Access the Admin Console with the owner role of Snoweaver or a custom role with the SNOWEAVER.APP_ADMIN application role.

  2. Open the OAuth Integrations page.

  3. Configure a new integration with the following settings:

    Name:                         sfdc_learn_dev_oauth_client
    OAuth Client ID:              <Consumer Key>
    OAuth Client Secret:          <Consumer Secret>
    OAuth Token Endpoint:         https://login.salesforce.com/services/oauth2/token
    OAuth Allowed Scopes:         api id refresh_token
    OAuth Access Token Validity:  3600
    ../_images/42.png

    Tip

    Use the consumer key and secret generated by the Salesforce connected app from the previous tutorial.

  4. Click Generate Script to create a SQL script for setting up the Snowflake OAuth Integration and granting Snoweaver access.

  5. Run the generated script in a Snowflake worksheet. Ensure that the role executing the script has the CREATE INTEGRATION privilege, such as the AccountAdmin role.

    Note

    Currently, Snowflake restricts native applications from requesting privileges to create security integrations on consumer accounts. This limitation may be lifted in the future, which could allow for automation of this process.

  6. Return to Snoweaver and register the new OAuth integration via the sidebar menu.

    ../_images/72.png

Create an OAuth secret

  1. Open the Secrets page.

  2. Configure a new secret with the following settings:

    Name:                   sfdc_learn_dev_oauth_access_token
    Secreet Type:           OAuth2
    Refresh Token:          <Refresh Token>
    OAuth Scopes:           api id refresh_token
    OAuth API Integration:  sfdc_learn_dev_oauth_client
    ../_images/82.png

    Tip

    Use the refresh token obtained from the previous tutorial.

  3. Save the new secret.

Create a network rule

  1. Open the Netowrk Rules page.

  2. Configure a new network rule with the following settings:

    Name:             sfdc_access_rule
    Allowed Domains:  <Org Domain>.my.salesforce.com
    ../_images/91.png
  3. Save the new network rule.

Create an external integration

  1. Open the External Integrations page.

  2. Configure a new integration with the following settings:

    Name:                   sfdc_learn_dev_access_integration
    Allowed Secrets:        sfdc_learn_dev_oauth_access_token
    Allowed Network Rules:  sfdc_access_rule
    ../_images/101.png
  3. Click Generate Script to create a SQL script for setting up the Snowflake External Access Integration and granting Snoweaver access.

  4. Run the generated script in a Snowflake worksheet. Ensure that the role executing the script has the CREATE INTEGRATION privilege, such as the AccountAdmin role.

    Note

    Currently, Snowflake restricts native applications from requesting privileges to create security integrations on consumer accounts. This limitation may be lifted in the future, which could allow for automation of this process.

  5. Return to Snoweaver and register the new External Access integration via the sidebar menu.

    ../_images/121.png

Update the project configuration

  1. Open the LEARN_DEV project on the Projects page.

  2. Add the newly created OAuth secret and External Access integration to the project:

    Secrets:                sfdc_learn_dev_oauth_access_token
    External Integrations:  sfdc_learn_dev_access_integration
    ../_images/131.png
  3. Save the changes to the project.

Create a project variable

  1. Open the LEARN_DEV project from the top menu in Snoweaver with the LEARN_DEV_DEVELOPER role.

  2. On the home page, create a new project variable with the following details:

    Name:     sfdc_account
    Type:     Text
    Value:    <Your Salesforce Org Account>
                e.g. snoweaver-dev-ed.develop
    ../_images/14.png
  3. Click Save to update the project configurations.