Manage apps¶
This topic describes how to manage a Snowflake Native App after it is installed in a consumer account.
View installed Snowflake Native Apps and Streamlit apps¶
To view an installed app, or a Streamlit app that was installed as part of an app, follow these steps:
Sign in to Snowsight.
In the navigation menu, select Data Products » Apps.
Review the list of installed app and Streamlit apps and select the app in the list.
If you selected an app, the app opens in a worksheet.
If you selected a Streamlit app, the Streamlit app displays in an editor.
View the readme file for an app¶
To view the readme file for an installed app, follow these steps:
Sign in to Snowsight.
In the navigation menu, select Data Products » Apps.
Select the app in the list, then select the Readme icon in the toolbar.
Grant application roles to account roles¶
To grant application roles to an account role in your account using Snowsight, follow these steps:
Sign in to Snowsight.
In the navigation menu, select Data Products » Apps.
Select the app, then select Manage Access.
Select Add roles, then select the account role you want to grant access to an application role.
Select Done.
To grant an application role to an account role in the consumer account using SQL commands, use GRANT APPLICATION ROLE of the GRANT DATABASE ROLE command as shown in the following example:
GRANT APPLICATION ROLE hello_snowflake_app.app_public TO ROLE data_manager;
Use custom budgets to monitor credit usage for an app¶
Budgets allow you to define a monthly spending limit on the compute costs for an app. You can create and configure a custom budget to monitor the credit usage for the objects owned by the app that consume credits.
When you add an app to a custom budget, the objects that are owned by the app and that consume credits are added to the custom budget automatically. These include the warehouses and compute pools that are owned by the app.
Warehouses and compute pools that are shared are not tracked by the custom budget automatically, although you can add these to the custom budget manually. When you create a custom budget for an app, you cannot add objects created and owned by an app to a separate custom budget. However, you can add warehouses and compute pools that are shared to a separate custom budget.
Set up the required role to create a custom budget for an app¶
To create or edit a custom budget for an app, you must use a role that has the correct privileges. See Create a custom role to manage the account budget
Create a custom budget for an app in Snowsight¶
You can create or edit a custom budget for an app directly from the app configuration page or from the Cost Management page.
To create a custom budget for an app from the app configuration page, follow these steps:
Sign in to Snowsight.
In the navigation menu, select Data Products » Apps.
Select the app whose custom budget you want to view.
Select the Cost management tab.
Select Create Budget.
Select Budget.
Enter a Budget name.
Select the database and schema in which to create your budget.
Enter the Spending limit.
Enter the email addresses to receive notifications.
Note
Each email address added for custom budget notifications must be verified. The notification email setup fails if any email address in the list is not verified.
Select Resources to monitor.
Select the app to add to the custom budget.
To add an app, expand Native Apps to select an app.
To add a database, expand Databases to select a database.
To add objects in a schema, expand the schema to list available objects. Expand the object category (for example, Tables or Tasks) to select objects.
To add a warehouse, expand Warehouses to select a warehouse.
To add a compute pool, expand Compute Pools to select a compute pool.
Note
When you select a database or schema, all supported objects (for example, tables) contained within the database or schema are also added to the custom budget.
You can only add an object to one custom budget. If an object is currently included in one custom budget and you add that object to a second custom budget, Snowflake removes the object from the first custom budget without issuing a warning.
Create a custom budget for an app by using SQL¶
To create a custom budget for an app by using SQL, see Use SQL commands to create a custom budget.
Uninstall a Snowflake Native App¶
You can uninstall an app using Snowsight or by running SQL commands.
Privileges required to uninstall an app¶
To uninstall an app, you must use a role that has the OWNERSHIP privilege on the app. GRANT OWNERSHIP for more information.
To transfer ownership of objects owned by the app that exist outside the app, you must use a role that has the MANAGE GRANTS privilege on the objects. See Access control considerations for more information.
Uninstall an app in Snowsight¶
To uninstall an app using Snowsight, follow these steps:
Sign in to Snowsight.
In the navigation menu, select Data Products » Apps.
Next to the app, select …, then select Uninstall.
If the app created objects that exist outside the app, a dialog appears showing a list of the objects and their types.
Select one of the following:
Yes, transfer selected objects to a role.
If you select this option, choose a role from the list. This role becomes the new owner of the object.
Caution
When using Snowsight, only the following objects owned by the Snowflake Native App can be transferred to a different role:
Database
Schema
Table
Views
No, delete all objects created outside the app.
If you select this option, the objects will be deleted when the app is uninstalled.
Select Uninstall.
Uninstall the app using SQL commands¶
To uninstall an app using SQL commands, follow these steps:
Use the
SHOW OBJECTS OWNED BY APPLICATION
command to view the objects owned by the Snowflake Native App that exist outside the app as shown in the following example:SHOW OBJECTS OWNED BY APPLICATION hello_snowflake_app;
This command shows a list of objects and their types.
Optionally, to transfer ownership of an object to a different role, use the GRANT OWNERSHIP command as shown in the following example.
GRANT OWNERSHIP ON DATABASE na_external_db TO ROLE consumer_role;
To delete the app, run the DROP APPLICATION command as shown in the following example:
DROP APPLICATION hello_snowflake_app CASCADE;
Note
If you do not transfer ownership of to a different role, you must used the
CASCADE
option.