- Schema:
MARKETPLACE_LISTING_INVOICE_STATUS view¶
The MARKETPLACE_LISTING_INVOICE_STATUS view in the DATA_SHARING_USAGE schema lets you query the history of invoices related to paid listings in the Snowflake Marketplace.
Only visible to providers of paid listings, this view includes the history of payment statuses per invoice for purchased listings.
Columns¶
Column Name |
Data Type |
Description |
---|---|---|
STRIPE_DISPLAY_NUMBER |
VARCHAR |
The Stripe invoice or display number. |
INVOICE_DATE |
DATE |
Date of invoice. |
USAGE_MONTH |
VARCHAR |
The first month when an invoice is generated, in |
INVOICE_STATUS |
VARCHAR |
Status of the invoice. Possible values: |
PO_NUMBER |
VARCHAR |
Purchase order (PO) number specified by the consumer to buy a listing. The PO number is manually entered by the consumer. |
CURRENCY |
VARCHAR |
Always USD (alternate currencies are not supported in this view). |
TOTAL_BILLED_AMOUNT |
DECIMAL |
Total amount billed to the consumer in USD. This amount includes consumer’s taxes. that apply to the consumer and provider fees. |
SALES_TAX_AMOUNT |
DECIMAL |
The sales tax in USD payable by the consumer. This amount is included in the |
FEES |
DECIMAL |
Provider fees. This amount is included in the |
EXPECTED_PAYOUT_AMOUNT |
DECIMAL |
The total expected payout to the provider in USD. This value is calculated by subtracting |
LISTING_DISPLAY_NAME |
VARCHAR |
Display name of the listing. |
LISTING_GLOBAL_NAME |
VARCHAR |
Global name of the listing. |
CONSUMER_ORGANIZATION_NAME |
VARCHAR |
Organization name of the consumer. |
CONSUMER_ACCOUNT_NAME |
VARCHAR |
Account name of the consumer. |
CONSUMER_ACCOUNT_LOCATOR |
VARCHAR |
Account locator of the consumer. |
CONSUMER_COMPANY_NAME |
VARCHAR |
Company name of the consumer. |
CONSUMER_BILLING_EMAIL_ADDRESS |
VARCHAR |
Email address associated with billing for the consumer. |
Usage Notes¶
Latency for the view can be up to 48 hours (2 days).
The data is retained for 365 days (1 year).
Examples¶
Retrieve billing information for export.
SELECT
stripe_display_number AS snowflake_mp_invoice_number,
invoice_date,
usage_month AS first_billing_month,
invoice_status,
po_number,
currency,
total_billed_amount,
listing_display_name,
listing_global_name,
consumer_organization_name,
consumer_account_name,
consumer_account_locator,
consumer_company_name,
consumer_billing_email_address
FROM snowflake.data_sharing_usage.marketplace_listing_invoice_status;
Retrieve details of unpaid invoices by consumer.
SELECT
consumer_account_name,
consumer_account_locator,
SUM( total_billed_amount ) AS total_outstanding
FROM snowflake.data_sharing_usage.marketplace_listing_invoice_status
WHERE invoice_status IN ('open')
GROUP BY ALL;