Request access to external and Apache Iceberg™ tables¶
This topic describes how a provider can configure an app to request that a consumer allow the app to access external and Apache Iceberg™ tables that a provider shares in an app.
About external and Iceberg tables in a Snowflake Native App¶
The Snowflake Native App Framework allows providers to share external tables and Apache Iceberg™ tables with consumers. For general information, see Support for external and Iceberg tables.
To include an external or Iceberg table in an app:
Add an entry for external and Iceberg tables to the manifest¶
To include external or Iceberg tables in an app, providers must add an entry in the manifest file as shown in the following example:
restricted_features:
EXTERNAL_DATA:
description: “The reason for enabling an external or Iceberg table.”
Request permissions to access external and Iceberg tables¶
For security and cost considerations, consumers must explicitly give an app permissions to use an external or Iceberg table.
Note
If an app attempts to resolve an external or Iceberg table directly in setup script the setup script fails if the consumer has not yet given permission to the app. To access external data, for example to create a view from an external table, providers should create the view in a stored procedure in the setup script. The app can then call the stored procedure after the consumer gives the app permission.
To create a Snowsight to allow consumers to allow an app access to external and Iceberg tables, the Python Permission SDK provides the following functions:
request_external_data() -> None
Causes Snowsight to display a dialog that prompts the consumer to allow the app to access the external or Iceberg tables required by the app.
is_external_data_enabled() -> boolean
Determines if the consumer has allowed the app to use external or Iceberg tables. Returns
True
if allowed. ReturnsFalse
, otherwise.