Merk
Tilgang til denne siden krever autorisasjon. Du kan prøve å logge på eller endre kataloger.
Tilgang til denne siden krever autorisasjon. Du kan prøve å endre kataloger.
The Databricks Connector for Google Sheets lets you save a reusable set of imports as a template in Unity Catalog. Create templates from your saved imports, organize them into groups, and import a template's queries into any sheet. By default, all account users can view and import a group's templates. You can give all account users write access or limit read or write access to specific users. A template stores only the query definitions, not the imported data, so each person who uses it runs the queries with their own Unity Catalog permissions.
This page explains how to set up, create, and manage templates. To import data from a template, see Choose an import method.
Set up templates
A workspace admin or a user with the CREATE CATALOG privilege must set up templates in the Databricks Connector for Google Sheets:
In the connector sidebar, click the Saved imports tab, then click the
Templates icon.
Enter a name for your first template group. Template groups organize related templates.
Choose who can access templates in the group:
- Give all account users read access is selected by default. Everyone in the account can view and import the group's templates.
- Give all account users write access isn't selected by default. Select it to let everyone in the account add, update, and delete templates in the group.
To limit read or write access to specific users, clear that checkbox and enter each user's email address. Press Enter after each address.
Click Setup Templates. This creates a
spreadsheet_templatescatalog and agsheet_templatesschema in your workspace's metastore. The connector stores each template group as a table in that schema. It grants all account usersUSE CATALOGon the catalog andUSE SCHEMAandCREATE TABLEon the schema, regardless of the access options. It grantsSELECTon the group's table to users with read access, andSELECTandMODIFYto users with write access.
Note
Existing template groups aren't migrated or modified. For a setup created with an earlier connector version, make sure account users have USE CATALOG on the spreadsheet_templates catalog and USE SCHEMA and CREATE TABLE on the gsheet_templates schema. To change who can access a template group later, update the privileges on the group's table, spreadsheet_templates.gsheet_templates.<group-name>, in Unity Catalog. See Manage privileges in Unity Catalog.
Create a template group
After templates are set up, users with USE CATALOG on the spreadsheet_templates catalog and USE SCHEMA and CREATE TABLE on the gsheet_templates schema can create template groups. To create a template in a group, users need MODIFY on the group's table.
Template groups organize related templates and control who can access them. By default, all account users have read access. You can give all account users write access or limit read or write access to specific users.
In the Saved imports tab, click the
Templates icon, then click + New Group.
Enter a group name using letters, numbers, and underscores.
Choose who can access templates in the group:
- Give all account users read access is selected by default. Everyone in the account can view and import the group's templates.
- Give all account users write access isn't selected by default. Select it to let everyone in the account add, update, and delete templates in the group.
To limit read or write access to specific users, clear that checkbox and enter each user's email address. Press Enter after each address.
Click Create group.
Create a template
Create a template from the imports already saved in your workbook:
- In the Saved imports tab, click the
Templates icon, then click + New Template.
- Select a template group and enter a name for the template.
- Select the saved imports to include.
- Click Create Template.
Manage templates
In the Templates view, you can do the following:
- Expand a template to see the imports it contains.
- Edit a template to add or remove imports.
- Delete a template.
Editing and deleting a template require SELECT and MODIFY on the template group's table.
Limitations
- You can add imports to or remove imports from a template, but you can't edit the saved query text from within a template. Instead, delete and recreate the template.
- You can't create templates from the Azure Databricks UI or from Azure Databricks saved queries.
- A template that includes a pivot table grouped by date and was saved with an earlier version of the connector fails to import. To fix this, recreate the template.