Snowflake

Revenium enables the metering of SQL queries to enable the granular monetization and analytics of data contained in Snowflake data warehouses.

Revenium periodically introspects a view created over Snowflake's QUERY_HISTORY table to infer query telemetry used for monetization, analytics and reporting.

Configuring a Data Warehouse

A Data Warehouse provides the necessary configuration for Revenium to poll external data sources like Snowflake to convert usage history into a format that allows for granular metering and advanced monetization models. To configure a Data Warehouse follow these steps:

Search for Integrations in the search bar -> choose data warehouse -> add new

Provide the configuration options:

Configure the Consumer Data Configuration

Click "Next" and define the details for the Data Warehouse to be monetized:

Configure the Date Warehouse
Configuration Parameter
Description

hostname

The Snowflake URL

username

The username

password

The password

database

The database to create the billing view over

warehouse

The warehouse name

Click "Next". While you shouldn't need to do this unless otherwise instructed by the Revenium Team, you can edit the Schema Creation SQL and Billing Query SQL in this screen:

Optionally edit the Schema Creation and Billing Query SQL

The Schema Creation SQL created the view over Snowflake's QUERY_HISTORY table that is queried periodically with the Billing Query SQL. The Billing Query SQL results are converted into transactions that are used for metering, analytics and reporting.

Create a Source

A Source, in the context of Snowflake, defines the columns of a table to be monetized. Defining columns and tables as sources allows you to create more complex monetization models, i.e. charging differently based on which columns and tables are accessed.

Navigate to Sources -> Add New and create a Subscriber Data Source. Columns that are to be tracked or monetized should be comma separated in the "Resource" field.

Creating a Consumer Data Asset

In the image above, Snowflake resources can be defined using either "COLUMN" or "TABLE:COLUMN" syntax. For example "SYMBOL" will meter any query that includes the SYMBOL column in its query. "MARKET_DATA:SYMBOL" will constrain metering only to the "SYMBOL" column in the "MARKET_DATA" table.

Next click on the "Custom Metadata" of the Source and set the "External Source ID" field to match the corresponding Snowflake warehouse:

Set the External Source ID to match the associated Snowflake warehouse

All Snowflake sources must share the same warehouse when grouped as a Product.

Snowflake Sources are interchangeable with other Source types, including APIs. This allows you to build sophisticated digital products that include a combination of API access and Snowflake access if desired. You can read more about product & subscription creation in the relevant documentation sections.

Last updated

Was this helpful?