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 Consumer Data Provider

A Consumer Data Provider 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 Consumer Data Provider follow these steps:

Navigate to External Integrations -> Data Sync -> Add New + Button

Configure the Consumer Data Configuration:

Give the Consumer Data Configuration a descriptive name. Each downstream Data Warehouse to be monetized will have a Consumer Data Configuration.

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

Configuration ParameterDescription

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:

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 an Asset

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

Navigate to Assets -> Add New and create a Consumer Data Asset. Columns that are monetized in queries are enumerated by the "Resource" field.

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.

Snowflake Assets are interchangeable with other Asset types, including APIs. This allows you to build sophisticated digital products that include a combination of API access and Snowflake access if desired.

Create a Product

Assets in Revenium are grouped together into monetized Products as follows. To create a new Product navigate to Products -> Add New

Click "Next" and select the Assets for the Product. A Product contains multiple Assets (Snowflake, REST, etc) in a single bundle:

Defining Product Licenses

Now that you've setup a Consumer Data Configuration, an Asset and a Product you're ready to define Product Licenses. Product Licenses are issued to each of your customers to allow them to access your products (and their associated assets). This allows Revenium to track usage by each customer individually.

Navigate to Product Licenses -> Add New and define a Product License for each downstream consumer:

Click "Next" and you can optionally define additional metadata for the license, including various notification options, query quotas, etc.

Detailed information on the available configurations for Product Licenses can be found here.

Last updated

© Revenium - www.revenium.io