Observe 4 Snowflake - Native App Install Instructions

Install Instructions

Before continuing, ensure that you have access to your Observe tenant and have the ability to create Datastream tokens. See Snowflake Observability for instructions on how to create an ingest token.

To install the O4S Snowflake Native app you must have at least ACCOUNTADMIN role for your Snowflake user. There are two primary app configuration steps:

  • SQL Statements - these are SQL statements that grant the Observe For Snowflake Native App the proper permissions. These steps are required to complete the UI configuration steps.

  • UI Configuration - once the app has the required access and configuration secrets set up via the Manual SQL steps, you can configure what data you wish to send to Observe.

Ingest Setup

Follow the steps outlined in section 2: Create Secrets, Network Rule, and External Access Integration of the Setup Instructions in the O4S Native app. These steps must be executed prior to creating or updating the values in Configure Observe Connection. In the app UI, you are adding the names of the SECRETS and NETWORK RULE, not the actual values.

Observe For Snowflake - SQL to UI

UI Configuration

The Observe 4 Snowflake Native App UI provides two left-hand tabs:

  • Setup Instructions - There are setup instructions embedded into the app for all Snowflake related configuration. This includes any manual SQL that needs to be run.

  • App - This is where all app configuration settings are managed, including which tables to monitor, scheduling, as well as status information.

The O4S UI provides flexibility in determining what ACCOUNT_USAGE history and objects you wish to collect and send to Observe. Furthermore, Observe 4 Snowflake supports the collection of EVENT TABLE logs, metrics and traces. Lastly, you can also select arbitrary tables or views, and send them to Observe.

For all collection cases, you can start and suspend each task individually by editing the RUNNING column, or collectively via the Suspend All and Start All buttons. Note that after you make changes to the SCHEDULE or RUNNING columns you must click Save Changes

Observe For Snowflake - App Config UI account usage

Data Collection Scheduling

By default, O4S sets up collection schedules for your ACCOUNT_USAGE views. For ideal performance, try to stagger your collection schedules 1 to 2 minutes apart. This helps reduce the number of write requests, and decreases the likelihood of any O4S collection tasks failing.

Native App UI Access Requests

There are two access requests that can be facilitated via the UI. These are automatically shown when access is not already provided. You can always change these settings by clicking the shield icon in the top right of the Native App.

  • ACCOUNT_USAGE and TASK Execution If these privileges have not been granted, there will be a pop-up dialog in the top right enabling you to do so upon page refresh.

Observe For Snowflake - App Config UI account usage
  • Grant Access to a Warehouse in the Account If privilege on a warehouse has not been granted, there will be a pop-up dialog in the top right enabling you to do so upon page refresh.

Observe For Snowflake - App Config UI warehouse

Adding Custom Tables

O4S can be configured to send data from arbitrary tables, via the TABLE or VIEW section of the app.

Observe For Snowflake - Add Table of View

You must grant the OBSERVE_FOR_SNOWFLAKE application SELECT privileges on any TABLE or VIEW as well as USAGE on it’s DATABASE and SCHEMA. Additionally, all tables and views added in this manner must also have CHANGE_TRACKING enabled.

Some example SQL for configuring permissions as well as enabling CHANGE_TRACKING for a table called APP_LEADS, contained in the database TESTDB01 under the schema CHAMP:

GRANT USAGE ON DATABASE TESTDB01 TO APPLICATION OBSERVE_FOR_SNOWFLAKE;
GRANT USAGE ON SCHEMA TESTDB01.CHAMP TO APPLICATION OBSERVE_FOR_SNOWFLAKE;
GRANT SELECT ON TABLE APP_LEADS TO APPLICATION OBSERVE_FOR_SNOWFLAKE;
ALTER TABLE TESTDB01.CHAMP.APP_LEADS SET CHANGE_TRACKING = TRUE;

Without granting the proper privileges and enabling change tracking, O4S will throw an error similar to the following, upon attempting to add a table or view:

An error occurred. 
Please ensure that your TABLE or VIEW exists 
and that the app has the necessary privileges to the 
TABLE or VIEW along with CHANGE_TRACKING enabled. 
See Setup Instructions.

Developer Tools

O4S provides a Developer Tools area that you can reach via the left-nav. Developer tools provides a UI to interact with the data collection tasks that O4S runs in your Snowflake account. These are advanced configuration options that you can use to fine tune and troubleshoot the behavior of O4S.

TASK Details

This provides an overview of the various data collection task names, schedules and states. The NAME column can be used to target changes to task properties.

Alter TASK Properties

This provides a mechanism to change the configuration for task suspensions, based on error responses from the Observe ingest endpoint (default is 0, which will be infinite retries). It also allows you to set the timeout for task execution (default is 24 hours or 86400000 milliseconds).

Clear STREAM

Clearing the stream is only intended in emergency cases, and will cause all current data to be clears and unrecoverable. Consult with Observe support if you believe you need to clear the O4S stream.