Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The Azure Databricks Excel Add-in lets you save a reusable set of imports as a template in Unity Catalog. Create templates from your saved imports, organize them into groups that you share with specific users, and import a template's imports into any workbook. 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 Import from a template.
Set up templates
A workspace admin or a user with the CREATE CATALOG privilege must set up templates in the Azure Databricks Excel Add-in:
- In the Azure Databricks Add-in pane in Excel, 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 use templates in the group:
- Give all account users read access: Everyone in the account can use templates in the group.
- Give read access to specific users: Enter one or more email addresses.
- Choose who can create templates in the group:
- Give all account users write access: Everyone in the account can create templates in the group.
- Give write access to specific users: Enter one or more email addresses.
- Click Set up. This creates a
spreadsheet_templatescatalog and anexcel_templatesschema in your connected metastore. Setup grants all account usersUSE CATALOGon the catalog, andUSE SCHEMAandCREATE TABLEon the schema. It also grantsSELECTon the template group to the users you gave read access, andSELECTandMODIFYto the users you gave write access.
Important
The sharing settings you choose during setup and when you create a group control who can use templates (SELECT) and who can create or edit templates (MODIFY) in that group. If you don't choose the account-wide option, only the users whose email addresses you enter have access. A workspace admin can give access to other users, such as users added after setup, by granting SELECT on the template group in Azure Databricks. To let a user create or edit templates, the admin must grant SELECT and MODIFY. See Manage privileges in Unity Catalog.
Create a template group
After templates are set up, any user can create template groups. Setup grants all account users CREATE TABLE on the spreadsheet_templates.excel_templates schema, which is what creating a group requires. To create or edit templates in a group, you need write access (MODIFY) on that group.
Template groups organize related templates and control who can access them. When you create a group, you choose which users can use the templates in it and which users can create templates in it.
To create a template group:
- In the Saved imports tab, click the
Templates icon, then click New group.
- Enter a group name using letters, numbers, and underscores. The name can't start with a number.
- Choose who can use the group:
- Give all account users read access: Everyone in the account can use templates in the group.
- Give read access to specific users: Enter one or more email addresses.
- Choose who can create templates in the group:
- Give all account users write access: Everyone in the account can create templates in the group.
- Give write access to specific users: Enter one or more email addresses.
- 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.
- (Optional) Under Set mandatory filters, mark filters on the selected imports as mandatory. Users of the template can change a mandatory filter's values but can't remove the filter or change its type.
- Click Create template.
Manage templates
On the Templates page, you can do the following:
- Expand a template to see the imports it contains.
- Edit a template to add or remove imports, or to change which filters are mandatory.
- Delete a template.
Editing and deleting a template require write access (MODIFY) on the template group.
Limitations
Templates have the following limitations:
- You can add imports to or remove imports from a template, but you can't edit an import's query text from within the template. To change the query, edit the import in your workbook, remove it from the template, and add the edited import back.
- A template can include only imports saved in the workbook where you create it.
- Mandatory filters are available only for table and pivot imports that have filters. Query imports don't have mandatory filters.
- Importing a template adds each import to a new sheet, and a template import doesn't include the original import's scheduled refresh settings. To keep the imported data up to date, schedule a refresh on the new imports.