Referenz zum Declarative Native App-Manifest

Anbieter erstellen eine Manifest-Datei als Teil eines Pakets.

The manifest file is a text-based YAML file, with the filename: manifest.yml. It’s used to declaratively share data and logic with consumers, such as notebooks, user-defined functions, stored procedures, tables, and views.

Die Manifest-Datei definiert auch App-Rollen, die App-Eigentümer verwenden können, um eine Teilmenge der Daten und Features der App an Teams in ihren Organisationsteams nach Rollen freizugeben.

Informationen zur Entwicklung eines Anwendungspakets finden Sie unter Anwendungspakete bei deklarativer Freigabe im Native Application Framework.

Declarative Native App-Manifest

Das allgemeine Format eines Declarative Native App-Manifests enthält Folgendes:

manifest_version: # Added automatically. Don't include.
application_content: # Optional, describes associated app logic
roles: # Optional, describes roles associated with shared_content
shared_content: # Required, describes associated data to be shared
Copy

Felder

Declarative Native App-Manifeste enthalten die folgenden Felder:

Feld manifest_version

Dieses Feld wird automatisch zur Manifest-Datei hinzugefügt, wenn Sie eine neue Version eines Anwendungspakets freigeben.

Fügen Sie dieses Feld nicht ein, wenn Sie eine Manifest-Datei erstellen, die Sie in ein Anwendungspaket aufnehmen möchten. Das manuelle Bearbeiten dieses Feldes wird nicht unterstützt.

Das manifest_version-Feld der obersten Ebene (Ganzzahl, erforderlich) gibt die Versionsnummer der Manifest-Datei an.

Weitere Informationen zur Versionierung finden Sie unter Paketversionen in der deklarativer Freigabe im Native Application Framework.

Feld application_content

Das application_content-Feld (Liste, optional) definiert gebündelte Inhalte, die deklarativ von der App freigegeben werden.

Dieses Feld enthält ein einzelnes notebooks-Feld:

  • application_content.notebooks (Liste, erforderlich): Eine Liste von benannten Notizbüchern.

Feld application_content.notebooks.{named notebook}

Jedes benannte Notizbuch unterstützt die folgenden Name/Wert-Paare:

  • main_file (Zeichenfolge, erforderlich) ist der Name der interaktiven Python-Notizbuchdatei (.ipynb).

  • comment (Zeichenfolge, optional): Ein Kommentar, der das Notizbuch beschreibt.

  • runtime_environment_version (Zeichenfolge, optional): Gibt eine bestimmte Version der Laufzeitumgebung für den Ausführungskontext des Notizbuchs an, falls innerhalb der Plattform anwendbar.

  • roles (list, optional): A list of app roles that can grant access to the notebook, for example, [sales,marketing]. When this field is empty ([]) or omitted, then only app owners and roles with granted IMPORTED PRIVILEGES receive access. The included roles must be defined in the top-level roles field.

application_context-Beispiel

In diesem Beispiel wird ein einzelnes Notizbuch, Verkaufsbuch, mithilfe der Notizbuchdatei NOTEBOOK1.ipynb definiert, die die bekannte Laufzeitumgebung stabil verwendet und den Zugriff denjenigen erlaubt, denen entweder die Rolle Verkauf oder Marketing zugewiesen wurde.

application_content:
    notebooks:
        - salesbook:
              roles: [sales, marketing]
              main_file: NOTEBOOK1.ipynb
              comment: Notebook1: Sales and marketing notebook
              runtime_environment_version: stable

roles:
  - sales:
  - marketing:
Copy

Feld roles

The roles top level field (list, optional) defines a list of app roles. These roles allow app owners to provide access to shared objects in an app — such as schemas, tables, views, and notebooks — to their organization.

Jede benannte Rolle kann optional einen comment enthalten, der als Beschreibung angezeigt wird, wenn der Besitzende der App die Rollen in der Anwendung auflistet.

These roles are referenced in the manifest by shared objects, at the named notebook, schema, table, view, or semantic_view level. For objects at the table, view, or semantic_view level, roles must also be specified at the schema level.

Bemerkung

  • All content in the manifest is accessible to the app owner, the ACCOUNTADMIN, and to roles that are granted IMPORTED PRIVILEGES to the app.

  • Der in dieser Manifest-Datei definierte Objektname wird für die Auflösung des Laufzeitobjekts verwendet. Wenn der Anbietende den Objektnamen ändert, ohne die Manifest-Datei mit einer neuen Version zu aktualisieren, verlieren die Verbrauchenden den Zugriff auf das Objekt.

roles-Beispiel

roles:
  - sales:
  - marketing:

application_content:
  notebooks:
    - salesbook:
        roles: [sales, marketing]
        main_file: NOTEBOOK1.ipynb
        comment: Sales and marketing notebook

shared_content:
  databases:
    - sales:
        schemas:
          - orders:
              roles: [sales, marketing]
              tables:
                - january_2025:        # App owners/assignees only
                - february_2025:
                    roles: [sales]     # Accessible to sales only
                - march_2025:
                    roles: [marketing] # Accessible to marketing only
    - customer_info:
        schemas:
          - customer_contact:
              roles: [customer_support]
              views:
                - customer_address:
                    roles: [customer_support] # Accessible to customer_support
                - customer_details:
                    roles: []                 # App owners/assignees only
Copy

Weitere Informationen zu Rollen finden Sie unter App-Rollen

Feld shared_content

The shared_content field (list, required) defines a list of databases declaratively shared by the app. Each database includes a list of named schemas. Each schema can include a list of named entities grouped by type.

This field includes a single databases field and an optional required_databases field:

  • shared_content.databases (List, required): A list of named database instances and the underlying objects to share. In the example below, the manifest adds a database named sales.

Feld shared_content.databases.{named database}

Jede benannte Datenbank unterstützt die folgenden Name/Wert-Paare:

  • schemas (Liste, erforderlich): Eine Liste der Schemas innerhalb der Datenbank.

shared_content.required_databases.{named database} field

The required_databases field (list, optional) defines a list of databases that are dependencies of the shared databases. These databases are referenced by views in the shared databases, but are not shared directly. When your application shares data from multiple databases, you must explicitly list all additional databases that are referenced by objects in your shared content under the required_databases field. This ensures that the application can be deployed successfully in other regions where these databases may not exist by default. Including a database in the required_databases field is similar to referencing a database using the REFERENCE_USAGE privilege in traditional Secure Data Sharing. For information about the REFERENCE_USAGE privilege and how dependent databases are shared in traditional data sharing, see Share data from multiple databases.

Feld schemas.{named schema}

Jedes benannte Schema unterstützt die folgenden Name/Wert-Paare:

[OneOfRequired] (1,2,3,4,5,6,7,8,9,10)

at least one of tables, views, semantic_views, functions, or procedures is required.

Wichtig

Sie müssen eine Schematrennung zwischen Datenobjekten (durch Referenz freigegebene Objekte: tables, views`und :code:`semantic_views) und Logikobjekten (Objekte, die per Kopie freigegeben werden (functions und procedures) erzwingen. Sie können Daten- und Logikobjekte nicht im selben Schema kombinieren.

Feld tables.{named table}

Jede benannte Standardtabelle (dynamische Tabelle (Liste, erforderlich [OneOfRequired] )) unterstützt das folgende Name-Wert-Paar:

Bemerkung

Freigegebene dynamische Tabellen und Apache Iceberg-Tabellen, die in Remoteregionen repliziert werden, sind schreibgeschützt und werden nicht automatisch aktualisiert. Die Aktualität der Daten hängt von der Replikationshäufigkeit der Quelle ab, und die zugrunde liegenden Quellobjekte müssen nicht repliziert werden. Weitere Details dazu finden Sie unter Hinweise zur Replikation.

Feld views.{named view}

Jede benannte Ansicht (Liste, erforderlich [OneOfRequired] ): unterstützt das folgende Name/Wert-Paar:

semantic_views.{named semantic view} field

Each named semantic view (List, required [OneOfRequired] ): supports the following name value pair:

  • roles (list, optional): A list of app roles that can access the semantic view; for example, [sales]. Note that, when sharing a semantic view, its referenced tables or views must be shared as well. When this field is empty ([]) or omitted, then only app owners and roles with granted IMPORTED PRIVILEGES receive access. The included roles must be defined in the top-level roles field and included in the {named schema}.roles field.

functions.{named function} field

Each named function (List, required [OneOfRequired] ): supports the following name value pair:

procedures.{named procedure} field

Each named stored procedure (List, required [OneOfRequired] ): supports the following name value pair:

shared_content-Beispiel

In this example, two databases are exposed: sales and customer_info. Within these databases the orders.[january_2025|february_2025] tables are exposed as well as the customer_contact.customer_address view.

Zwei erforderliche Datenbanken sind ebenfalls verfügbar: sales_projections und customer_analytics. Diese Datenbanken können über Ansichten in den freigegebenen Datenbanken referenziert werden, werden aber nicht direkt freigegeben.

roles:
  - sales:
  - marketing:

shared_content:
  required_databases:
    sales_projections
    customer_analytics
  databases:
    - sales:
        schemas:
          - orders:
              roles: [sales, marketing]
              tables:
                - january_2025:        # App owners/assignees only
                - february_2025:
                    roles: [sales]     # Accessible to sales only
                - march_2025:
                    roles: [marketing] # Accessible to marketing only
    - customer_info:
        schemas:
          - customer_contact:
              roles: [customer_support]
              views:
                - customer_address:
                    roles: [customer_support] # Accessible to customer_support
                - customer_details:
                    roles: []                 # App owners/assignees only
Copy

Beispiel einer Manifest-Datei

The following code block is an example of a Declarative Native App manifest file.

Beachten Sie, dass sich Daten- und Codeobjekte in unterschiedlichen Schemas befinden müssen.

manifest_version: 2

roles:
  - VIEWER:
      comment: "The VIEWER role provides access to only one view."
  - ANALYST:
      comment: "The ANALYST role provides access to views, the table, and logic."

shared_content:
  databases:
    - SNAF_POPULATION_DB:
        schemas:
          - DATA_SCHEMA:
              roles: [VIEWER, ANALYST]
              tables:
                - COUNTRY_POP_BY_YEAR:
                    roles: [ANALYST]
                - POPULATION_DYNAMIC_TABLE:
                    roles: [ANALYST]
                - MANAGED_POPULATION_ICEBERG_TABLE:
                    roles: [ANALYST]
              views:
                - COUNTRY_POP_BY_YEAR_2000:
                    roles: [VIEWER, ANALYST]
          - LOGIC_SCHEMA:
              roles: [ANALYST]
              functions:
                - POPULATION_ANALYSIS_FUNCTION(NUMBER):
                    roles: [ANALYST]
              procedures:
                - POPULATION_ANALYSIS_PROCEDURE():
                    roles: [ANALYST]
application_content:
  notebooks:
      - intro_notebook:
          roles: [VIEWER, ANALYST]
          main_file: INTRO_NB.ipynb
      - analyst_notebook:
          roles: [ANALYST]
          main_file: ANALYST_NB.ipynb
Copy