- Schema:
PAID_LISTING_ACCESS_AND_CHANGE_LOG view¶
Providers can use this view in the Data Sharing Usage schema to query a consumer’s paid listing change log to determine the status of a pricing plan and when consumers will lose access to paid or trial listings.
This view is updated when a consumer changes their pricing plan, starts or ends a trial listing, or when they cancel a subscription.
Columns¶
Column Name |
Data Type |
Description |
---|---|---|
EVENT_DATE |
DATETIME |
The date and time the row was created. |
LISTING_NAME |
VARCHAR |
The name of the listing associated with the pricing plan. |
LISTING_DISPLAY_NAME |
VARCHAR |
The listing display name. |
LISTING_GLOBAL_NAME |
VARCHAR |
The Unique Listing Locator (ULL) for the listing. |
CONSUMER_ACCOUNT_NAME |
VARCHAR |
The consumer account name. |
CONSUMER_ACCOUNT_LOCATOR |
VARCHAR |
The Snowflake consumer account locator. |
CONSUMER_ORGANIZATION_NAME |
VARCHAR |
The consumer organization name. |
CONSUMER_SNOWFLAKE_REGION |
VARCHAR |
The Snowflake region that corresponds to the consumer’s organization billing and shipping addresses. |
CURRENT_PRICING_PLAN |
VARIANT |
Information in JSON format about the pricing plan that was active on the date and time specified in the EVENT_DATE column. The following information can be returned:
|
NEXT_PRICING_PLAN |
VARIANT |
Information in JSON format about the pricing plan that becomes active on the date and time specified in the |
IS_CONSUMER_AUTO_RENEWAL_ENABLED |
BOOLEAN |
The consumer enabled auto-renewal. This is applicable only to subscription listings. |
PURCHASE_STATE |
VARCHAR |
The listing state. The state can be one of:
|
CURRENT_PRICING_PLAN_START_ON |
DATETIME |
The date and time a pricing plan became active. |
CURRENT_PRICING_PLAN_END_ON |
DATETIME |
The date and time the current pricing plan ends. |
TRIAL_END_ON |
DATETIME |
The end date of the listing trial. |
ACCESS_END_ON |
DATETIME |
The date and time the current subscription term ends. NULL indicates that the current plan is not a subscription, but a usage based plan instead. |
Usage notes¶
Latency for the view may be up to two days.
The data is retained up to one year.
A row is created when any column changes. For example, when a consumer changes their pricing plan, starts or ends a trial, cancels a subscription, or deletes the data.
The data includes all consumers who have accessed the listing at least once, including those who have canceled their listing subscription or trial.
The view contains data for paid Snowflake listings that have one or more consumers.
This report contains one row per listing per consumer. For example, if a consumer purchased two listings from a provider and each purchase was updated three times, then the view contains six entries. An individual column represents the state of a single, specific purchase.
The following data is not included in the view:
Limited trial listings
Free listings - provided without charge on or off the Snowflake platform
Free listings - provided without charge on-platform, but paid off-platform directly to the provider
Listings that have never been accessed by consumers
Examples¶
Show a change log for a specified listing and consumer:
SELECT
event_date,
listing_name,
listing_global_name,
consumer_account_name,
consumer_account_locator,
consumer_organization_name,
current_pricing_plan,
next_pricing_plan,
is_consumer_auto_renewal_enabled,
purchase_state,
current_pricing_plan_start_on,
current_pricing_plan_end_on,
trial_end_on,
access_end_on
FROM snowflake.data_sharing_usage.paid_listing_access_and_change_log
WHERE TRUE
AND consumer_organization_name = 'specific_organization_name'
AND listing_display_name = 'specific_listing_display_name'
ORDER BY event_date DESC;
Show listings and consumers with pricing plans ending in the next billing period:
SELECT
event_date,
listing_name,
listing_global_name,
consumer_account_name,
consumer_account_locator,
consumer_organization_name,
current_pricing_plan,
next_pricing_plan,
is_consumer_auto_renewal_enabled,
purchase_state,
current_pricing_plan_start_on,
current_pricing_plan_end_on,
trial_end_on,
access_end_on
FROM snowflake.data_sharing_usage.paid_listing_access_and_change_log
WHERE TRUE
AND consumer_organization_name = 'specific_organization_name'
AND listing_display_name = 'specific_listing_display_name'
QUALIFY TRUE
AND ROW_NUMBER() OVER (
PARTITION BY
consumer_organization_name,
consumer_snowflake_region,
consumer_account_name,
listing_display_name
ORDER BY event_date DESC ) = 1;