Schema:

DATA_SHARING_USAGE

APPLICATION_STATE view

This view in the DATA_SHARING_USAGE schema can be used to display information about apps installed from a listing for all application packages in the current account.

If a listing was published using Cross-Cloud Auto-Fulfillment, this view displays information for installed apps across all regions.

Columns

Column Name

Data Type

Description

CONSUMER_SNOWFLAKE_REGION

VARCHAR

The Snowflake region of the consumer account where the app is installed.

CONSUMER_ORGANIZATION_NAME

VARCHAR

The organization name of the consumer account.

CONSUMER_ACCOUNT_LOCATOR

VARCHAR

The consumer account locator.

CONSUMER_ACCOUNT_NAME

VARCHAR

The consumer account name.

PROVIDER_SNOWFLAKE_REGION

VARCHAR

The Snowflake region of the provider account that created the application package.

PROVIDER_ACCOUNT_LOCATOR

VARCHAR

The provider account locator.

PROVIDER_ACCOUNT_NAME

VARCHAR

The provider account name.

PACKAGE_NAME

VARCHAR

The current name for the application package in the provider’s account from which the app was installed.

APPLICATION_NAME_HASH

VARCHAR

The hash string of the name of the installed app instance in the consumer account. The consumer uses the SHA1 function to calculate the hash value of the installed application. The consumer can then use this value when contacting the provider.

CREATED_ON

DATETIME

The timestamp when the app instance was first installed.

CURRENT_VERSION

VARCHAR

The current version of the app.

CURRENT_PATCH

INT

The current patch level of the app.

CURRENT_INSTALLED_ON

DATETIME

The timestamp when the current version of the app was installed.

PREVIOUS_VERSION_STATE

VARCHAR

The state of the previous version. Possible values are COMPLETE and FINALIZING.

  • COMPLETE indicates that upgrade is completed and that there are no active queries being executed from the previous version, if it exists.

  • FINALIZING indicates that the instance has been upgraded from the previous version, however one or more queries may be still be running that are using the previous version.

PREVIOUS_VERSION

VARCHAR

The previous version of the app.

PREVIOUS_PATCH

INT

The previous patch level of the app.

UPGRADE_STATE

VARCHAR

The version upgrade state of the app. Possible values are:

  • INSTALLING: The application object is in the process of being created.

  • INSTALL_FAILED: The creation of the application object failed. The application object remains in the INSTALL_FAILED state until it is dropped. See the UPGRADE_FAILURE_REASON column of the DESCRIBE APPLICATION command for information about why the installation or upgrade failed.

  • COMPLETE: The setup script successfully completed and the application object was created or upgraded.

  • QUEUED: The application object is queued for upgrade.

  • UPGRADING: The application object is in the process of being upgraded.

  • FAILED: All upgrade attempts failed. The reason for the failure is listed in the UPGRADE_FAILURE_REASON column, if present. The instance remains in the FAILED state until a release directive is updated to point to a different version than the one that the upgrade was targeting, as defined in the TARGET_UPGRADE_VERSION column.

  • QUEUED_RETRY: The instance failed one or more upgrade attempts. The reason for the failure is indicated in UPGRADE_FAILURE_REASON: The instance is queued to perform another upgrade attempt.

  • DISABLED: The application object and its upgrades were disabled. In this state the instance will be inaccessible for consumers, it will not be considered for upgrades and will not block application package version drop. The reason for the failure is listed in the UPGRADE_FAILURE_REASON column, if present.

TARGET_UPGRADE_VERSION

VARCHAR

The target version of the app that is running or pending upgrade.

TARGET_UPGRADE_PATCH

INT

The version patch level of the app that is running or pending upgrade.

UPGRADE_STARTED_ON

DATETIME

The timestamp when the app upgrade started.

UPGRADE_ATTEMPT

INT

The number of attempts to upgrade to the target version or patch.

UPGRADE_ATTEMPTED_ON

DATETIME

The timestamp when the most recent upgrade attempt was attempted.

UPGRADE_FAILURE_REASON

VARCHAR

A description of the failure if the previous app upgrade failed.

LISTING_NAME

VARCHAR

The name of the listing on the data exchange from which the app was installed.

LISTING_DISPLAY_NAME

VARCHAR

The display name of the listing.

EXCHANGE_NAME

VARCHAR

The data exchange name of the listing from which the app was installed.

LAST_HEALTH_STATUS

VARCHAR

The last reported health status of the app. Possible values are:

  • OK

  • FAILED

  • PAUSED

LAST_HEALTH_STATUS_UPDATED_ON

VARCHAR

The timestamp when the health status was last reported.

ENABLED_TELEMETRY_EVENT_DEFINITIONS

VARCHAR

A list of event definitions that the consumer has enabled. See About event definitions for more information.

UPGRADE_STATE_UPDATED_ON

TIMESTAMP_LTZ

The timestamp when the app entered its current upgrade state. This value is automatically set by Snowflake.

DISABLEMENT_REASONS

VARCHAR

An array containing the reasons why the Snowflake Native App was disabled. See Reasons an app can become disabled.

Reasons an app can become disabled

The following table lists the possible values for the DISABLEMENT_REASONS column:

Value

Status description

Is recoverable?

MANUALLY_DISABLED

The app is disabled by Snowflake

Yes. To re-enable the app, contact Snowflake Support.

ACCOUNT_INACTIVE

The account becomes inactive by being locked or suspended causing the app to be unavailable. In this state a consumer cannot execute any SQL queries in their account and the app cannot be upgraded.

Yes. The app is automatically re-enabled if the account lock or suspension is removed

PACKAGE_VERSION_IS_MISSING

The application package version for the app was dropped by the provider. The app is no longer usable and must be dropped and reinstalled from a valid listing or application package

No the same name.

CMK_ACCESS_DENIED

The consumer manages the encryption key themselves (ENCRYPT_USE_CMK_KMS is enabled) and Snowflake doesn’t have access to this key.

Yes. To re-enable the app, ensure that the cloud provider configuration to retrieve the CMK is correct and that Snowflake has access to the key.

LISTING_ACCESS_REVOKED

The listing used to create the app is no longer available. Possible reasons for this status include:

  • The provider deleted the listing

  • The provider manually removed access to the private listing from the consumer account

Possibly. Recoverability depends on the reason why access was revoked.

For example, if the listing was deleted it is not recoverable. If a consumer account was manually removed from the private listing, access to the listing and app can be restored.

LISTING_TRIAL_USAGE_EXCEEDED

The application has exceeded the usage limit for a usage-based trial listing.

No

LISTING_PAYMENT_REQUIRED

The listing used to install the app is a paid listing and requires payment for further usage.

Yes. The consumer must correctly set up payment for the app.

LISTING_TRIAL_TIME_EXCEEDED

The application exceeded the trial duration.

No

APPLICATION_PACKAGE_NOT_AVAILABLE

The application package used to create the app no longer exists. The provider may have dropped the corresponding application package.

No

APPLICATION_PACKAGE_DISABLED

The application package used to create the app is disabled by the Snowflake.

Yes. The app is re-enabled, if Snowflake re-enables the application package.

APPLICATION_SUSPENDED

The app resources for example, tasks, services, and compute pools, are suspended due to the app being disabled.

The suspended objects remain suspended until the app is re-enabled and there are no other reasons the app was disabled.

Yes

APPLICATION_SUSPEND_RESUME_IN_PROGRESS

The app resources, for example tasks, services, and compute pools, are currently resuming.

Yes

Usage notes

  • There is no data retention for this view. If an app is uninstalled the information contained in this view is no longer available.