To generate an application package using SQL, employ the CREATE APPLICATION PACKAGE command, exemplified in the following instance:
CREATE APPLICATION PACKAGE HelloSnowflakePackage;
After creating an application package, use the SHOW APPLICATION PACKAGES command to view the list of available application packages.
Granting Privileges on an Application Package:
Certain tasks associated with the development of an application package necessitate specific privileges assigned to the application package. The following table outlines the privileges required for performing these tasks:
ATTACH LISTING Add an application package to a listing.
DEVELOP Create an APPLICATION object in development mode from the application package.
INSTALL Create an APPLICATION object based on the application package.
MANAGE RELEASES Specify a release directive, view the version and patch level.
MANAGE VERSIONS Add a version and patch level to an application package.
OWNERSHIP Perform all tasks mentioned above.
Granting Privileges on an Application Package Using Snowsight:
To configure privileges for an application package using Snowsight, follow these steps:
1. Log in to Snowsight.
2. In the left navigation bar, go to Apps and then select Packages.
3. Choose the desired application package, and click on the Settings tab.
4. Within the Privileges section, click the edit icon next to the privilege you wish to grant.
5. Click on Add Role, and then select the role to which you want to grant the privilege.
6. Save your changes.
The assigned role will now be displayed next to the granted privilege.
Granting privileges on an application package to a role using SQL commands:
It involves using the GRANT command, illustrated in the following example:
GRANT MANAGE RELEASES ON APPLICATION PACKAGE HelloSnowflakePackage TO ROLE app_release_mgr;
This command bestows the MANAGE RELEASES privilege upon the app_release_mgr role. You can employ the identical command to confer other available privileges on an application package.