Installing and configuring the connector with Snowsight

The Snowflake connector for ServiceNow® is subject to the Connector Terms.

This topic provides information on installing and configuring the Snowflake Connector for ServiceNow® through Snowsight.

Installing the Snowflake Connector for ServiceNow®

The following procedure describes how to install the connector:

  1. Sign in to Snowsight as a user with the ACCOUNTADMIN role.

  2. In the navigation menu, select Data Products » Marketplace.

  3. Search for the Snowflake Connector for ServiceNow®, then select the tile for the connector.

  4. In the page for the Snowflake Connector for ServiceNow®, select Get.

    This displays a dialog that you use to begin the initial part of the installation process.

    In the dialog configure the following:

    1. In the Database name field, enter the name of the database to be used as the database for the connector instance. This database is created for you automatically.

    2. In the Warehouse used for installation field, select the warehouse that you want to use for installing the connector.

      Note

      This is not the same warehouse that is used by the connector to synchronize data from ServiceNow. In a later step, you will create a separate warehouse for this purpose.

    3. In the Which roles, in addition to ACCOUNTADMIN, can access this database? field, add the other roles you want to have access to the database.

    4. Select Get.

  5. A dialog appears with the notification: <Your database name> is now ready to use in your account. To continue configuration, select Manage.

    The dialog closes, and the Snowflake Connector for ServiceNow® page displays the UI for configuring and managing the connector.

Setting Up the Connection to ServiceNow

The following procedure describes how to set up a connection to ServiceNow:

  1. In the Connections section, select Connect to configure the settings for connecting to the ServiceNow instance.

    This displays the Connect to ServiceNow dialog.

  2. In the ServiceNow Instance field, enter the name of the ServiceNow instance.

    This is the first part of the hostname of your ServiceNow instance. For example, if the URL to your ServiceNow instance is:

    https://myinstance.service-now.com
    
    Copy

    The name of your instance would be myinstance.

  3. In the Authentication Method field, select the authentication method you want to use to allow the connector to connect to the ServiceNow instance.

    You can select either basic authentication (username and password) or OAuth.

  4. If you selected Basic authentication, enter the credentials for your ServiceNow account in the ServiceNow username and ServiceNow password fields.

  5. If you selected OAuth, create an application registry in ServiceNow and use it to configure the connector.

    To create the application registry, do the following:

    1. Login to your ServiceNow instance, then select Homepage.

    2. Search for OAuth, then select Application Registry.

    3. Select New, then select Create an OAuth API endpoint for external clients.

      This displays a configuration page for the application registry as shown in the following image:

      Displays the Application Registry page in ServiceNow on the left.
    4. In ServiceNow, enter a name for the OAuth application registry in the Name field.

    5. In the connector UI, copy the value in the Redirect URL field.

      This value was generated by the connector.

    6. In ServiceNow, paste this value in the Redirect URL field.

    7. If required, in ServiceNow, update the values in the Refresh Token Lifespan and Access Token Lifespan fields.

      • Snowflake recommends setting the lifespan of the access token to at least 600 seconds.

      • For the lifespan of the refresh token, specify a value that is 7776000 (90 days).

    8. In ServiceNow, select Submit.

      The OAuth application registry appears in the list of application registries.

    9. In ServiceNow, select the application registry you just created.

      Note that ServiceNow created values for the Client ID and Client Secret fields.

    10. In ServiceNow, copy the value for Client ID.

    11. Paste this value into the Client ID field in the connector UI.

    12. In ServiceNow, copy the value for Client Secret.

    13. Paste this value into the Client Secret field in the connector UI.

      The connector uses a secret (a type of schema-level object) to store the access tokens used to authenticate to the ServiceNow instance. The connector uses this secret object with a security integration and an API integration to connect to the ServiceNow instance.

      The secret, security integration, and API integration are created automatically when you install the connector.

    14. To specify how the secret object, security integration, and API integration are configured, select Advanced Settings, and fill in the following fields:

      Field

      Description

      Secret Name

      The name of the secret. The connector generates this value. You cannot change this value.

      Authorization URL

      The URL for authenticating to the ServiceNow instance. This URL should be in the following format:

      https://<instance_name>.service-now.com/oauth_token.do
      
      Copy

      Where instance_name is the name of your ServiceNow instance.

      Token URL

      The URL for requesting a refresh token for the ServiceNow instance. This URL should be in the following format:

      https://<instance_name>.service-now.com/oauth_token.do
      
      Copy

      Where instance_name is the name of your ServiceNow instance.

      Allowed Prefix

      The URL to your ServiceNow instance.

      This limits the use of these connection settings. The settings can only be used to connect to URLs with the specified prefixes.

  6. In the connector UI, select Connect.

    A dialog appears asking you to login to your ServiceNow instance with User name and Password. Provide the credentials of the user you want the connector to authenticate with - it needs to have the privileges listed in Preparing your ServiceNow® instance.

  7. Once logged in confirm that you want to allow the connector to connect to your ServiceNow account. Select Allow.

    Note

    If you were redirected directly to this dialog without needing to provide credentials, then you are already logged in to your ServiceNow instance. Ensure you are logged in as the same user the connector should use and that user has the necessary privileges. Note: The current logged-in user is shown in upper right corner of the dialog.

    The new ServiceNow connection appears in the Connection area.

As a result of these steps, the wizard creates the following objects residing outside of the connector database that are needed by the connector to work:

  • Database CONNECTORS_UI with schema SERVICENOW_GZSTZTP0KHD used to store secret object,

  • Secret object in CONNECTORS_UI.SERVICENOW_GZSTZTP0KHD named SECRET with ServiceNow credentials,

  • Security integration named SERVICENOW_GZSTZTP0KHD_INTEGRATION, which is used to integrate between Snowflake and a third-party OAuth 2.0 service if OAuth authentication was chosen as the authorization method,

  • API integration SERVICENOW_GZSTZTP0KHD_API is used for communication with ServiceNow.

Names of these objects must not be changed. The connector references them by name. Changing their names or dropping them breaks references and will break the connector.

Configuring the Snowflake Connector for ServiceNow®

  1. Sign in to Snowsight as a user with the ACCOUNTADMIN role.

  2. In the navigation menu, select Data Products » Marketplace.

  3. Search for the Snowflake Connector for ServiceNow®, then select it.

  4. Under the status for the connector, select Configure.

    This displays the Configure Connector dialog.

    Note

    By default, the fields are set to the names of objects that are created when you configure the connector. Snowflake recommends using new objects for these fields. However, you can specify the names of existing objects, if needed (e.g. if you are reinstalling the connector).

    In this dialog, fill in the following fields:

    Field

    Description

    Warehouse

    Identifier for a new, dedicated virtual warehouse for the connector.

    Specify a name that is unique for your account. The name of the warehouse must be a valid object identifier.

    Note

    Do not specify the same warehouse that you selected at the beginning of the connector installation.

    The configuration process creates a new Large warehouse with the specified name.

    Destination Database

    Identifier for a new database that will contain the schema with the tables for the ServiceNow data in Snowflake.

    Specify a name that is unique for your account. The name of the database must be a valid object identifier.

    The configuration process creates a new database with the specified name.

    Destination Schema

    Identifier for a new schema that will contain the ServiceNow data in Snowflake.

    The Snowflake Connector for ServiceNow® ingests ServiceNow data into tables in this schema.

    Specify a name that is unique for your account. The name of the schema must be a valid object identifier.

    The configuration process creates a new schema with the specified name.

    Role

    Identifier for a new custom role for the connector. This role allows the connector to:

    • Create and manage tasks for ingesting the data.

    • Use the dedicated warehouse.

    • Access the secret and API integration in order to connect to the ServiceNow instance.

    The role is also the owner of the tables and views containing the ServiceNow data ingested by the connector.

    Specify a name that is unique for your account. The name of the role must be a valid object identifier.

    The configuration process creates a new role with the specified name.

    While it’s recommended to create separate, more fine-grained role(s) to access the ingested data after ingestion has started, you can use this role to query ingested data and you can extend it with additional privileges. Conversely, revoking role privileges to objects required by the connector or changes in role ownership of tables and views with ingested data isn’t allowed and will break the connector.

    Journal table

    (Optional) To enable the propagation of deleted records, set this to the table that serves as the source of information about deleted records.

    You can use either the sys_audit_delete table or a custom journal table as the source of information about deleted records.

    If you do not want to ingest deleted records from ServiceNow into Snowflake, leave this field empty.

    Note

    Ensure that the ServiceNow user for the connector has access to the specified journal table.

  5. Select Configure.

The dialog closes and the status of the connector changes to Provisioning. It can take a few minutes for the configuration process to complete.

The Connector Objects section displays the objects that were created automatically during installation and configuration. The connector uses these objects to ingest data from the ServiceNow instance. To view the details on an object, select the object.

If the configuration process finishes successfully, the displayed status changes to Inactive.

Connector references warehouse, destination database, destination schema and role by name. Changing names of these objects or deleting them will cause the references to break, and as a result will break the connector. Instead of renaming the warehouse, use the CONFIGURE_WAREHOUSE stored procedure to change the warehouse used by the connector.

Troubleshooting Errors During Configuration

If an error occurs during the configuration process, the connector status changes to Incomplete. To identify and address the errors:

  1. Select Retry Setup to display the configuration dialog again.

  2. Check for error messages under any of the fields.

  3. Fix the problems in the fields, and select Configure to start the configuration process again.

Next steps

After installing and configuring the connector, perform the steps described in Setting Up data ingestion for your ServiceNow® data.