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 application 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 application was installed.

APPLICATION_NAME_HASH

VARCHAR

The hash string of the name of the installed application 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 application instance was first installed.

CURRENT_VERSION

VARCHAR

The current version of the installed application.

CURRENT_PATCH

INT

The current patch level of the installed application.

CURRENT_INSTALLED_ON

DATETIME

The timestamp when the current application version 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 application version of the installed application.

PREVIOUS_PATCH

INT

The previous patch level of the application.

UPGRADE_STATE

VARCHAR

The version upgrade state of the application. 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. The reason for the failure is listed in the UPGRADE_FAILURE_REASON column, if present.

  • 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 application that is running or pending upgrade.

TARGET_UPGRADE_PATCH

INT

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

UPGRADE_STARTED_ON

DATETIME

The timestamp when the application 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 application upgrade failed.

LISTING_NAME

VARCHAR

The name of the listing on the data exchange from which the application 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 application was installed.

Usage Notes

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