---
title: Read data shared using Databricks-to-Databricks OpenSharing (for recipients)
description: Read tables, views, volumes, models, and notebooks shared with you over the Databricks-to-Databricks OpenSharing protocol, using Unity Catalog without a credential file.
canonical_url: https://docs.databricks.com/aws/en/opensharing/read-data-databricks
---

# Read data shared using Databricks-to-Databricks OpenSharing (for recipients)

As a recipient, you read data and notebooks shared with you using the *Databricks-to-Databricks* OpenSharing protocol, where Databricks manages a secure connection for data sharing. Unlike the OpenSharing *open sharing* protocol, the Databricks-to-Databricks protocol does not require a credential file (token-based security).

Databricks-to-Databricks sharing requires that you, as the recipient, meet *both* of the following requirements:

* You have access to a Databricks workspace that is [enabled for Unity Catalog](https://docs.databricks.com/aws/en/data-governance/unity-catalog/enable-workspaces.md).
* The provider is using the *Databricks-to-Databricks* OpenSharing protocol, not the Databricks-to-Open sharing protocol, which provides you with a credential file.

If the provider is using open sharing (which provides you with a credential file) but you have a Unity Catalog-enabled workspace, you can import the provider and read the shared data in Databricks. See [Import a provider and read shared data in Databricks](https://docs.databricks.com/aws/en/opensharing/read-data-open-databricks.md). If you don't have a Unity Catalog-enabled workspace, see [Read data shared with bearer tokens](https://docs.databricks.com/aws/en/opensharing/read-data-open.md).

## <a id="overview" />How do I make shared data available to my team?

To read data and notebooks that have been shared with you using the Databricks-to-Databricks protocol, you must be a user on a Databricks workspace that is enabled for [Unity Catalog](https://docs.databricks.com/aws/en/data-governance/unity-catalog/index.md). A member of your team gives the data provider a unique identifier for your Unity Catalog metastore, and the data provider uses that identifier to create a secure sharing connection with your organization. The shared data then becomes available for read access in your workspace. Updates the data provider makes to the shared tables, views, volumes, and partitions are reflected in your workspace in near real time. Updates the data provider makes to shared Unity Catalog agent skills reach your workspace asynchronously.

> [!NOTE]
>
> Column changes, such as adding, renaming, or deleting, may not appear in Catalog Explorer for up to one minute. Likewise, new shares and updates to shares, including adding new tables, are cached for one minute before they are available for you to view and query.

> [!NOTE]
>
> The tables in `information_schema` from a shared catalog reflect metadata stored in Unity Catalog. This metadata is updated from the provider only when you query the shared table directly or run a command such as [DESCRIBE](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-syntax-aux-describe-table.md). Until then, `information_schema` might appear stale compared to the provider's data.

To read data that has been shared with you:

1. A user on your team finds the *share* (the container for the tables, views, volumes, and notebooks that have been shared with you) and uses that share to create a *catalog* (the top-level container for all data in Databricks Unity Catalog).
2. A user on your team grants or denies access to the catalog and the objects inside the catalog (schemas, tables, views, and volumes) to members of your team.
3. You read the data in the tables, views, and volumes that you have been granted access to like any data asset in Databricks that you have read-only (`SELECT` or `READ VOLUME`) access to.
4. You can preview and clone notebooks in the share, as long as you have the `USE CATALOG` privilege on the catalog.

## <a id="permissions" />Permissions required

To be able to list and view details about all providers and provider shares, you must have the `USE PROVIDER` privilege. Other users have access only to the providers and shares that they own.

To create a catalog from a provider share, you must be a metastore admin, a user who has both the `CREATE CATALOG` and `USE PROVIDER` privileges for your Unity Catalog metastore, or a user who has both the `CREATE CATALOG` privilege and ownership of the provider object.

The ability to grant read-only access to the schemas (databases), tables, views, and volumes in the catalog created from the share follows the typical Unity Catalog privilege hierarchy. The ability to view notebooks in the catalog created from the share requires the `USE CATALOG` privilege on the catalog. See [Manage permissions for the schemas, tables, and volumes in an OpenSharing catalog](https://docs.databricks.com/aws/en/opensharing/read-data-databricks.md#schema-table-permissions).

## <a id="access-data" />Access data in a shared table or volume

To read data in a shared table or volume:

1. A privileged user must create a catalog from the share that contains the table or volume. This can be a metastore admin, a user who has both the `CREATE CATALOG` and `USE PROVIDER` privileges for your Unity Catalog metastore, or a user who has both the `CREATE CATALOG` privilege and ownership of the provider object.
2. That user or a user with the same privileges must grant you access to the shared table or volume.
3. You can access the table or volume just as you would any other data asset registered in your Unity Catalog metastore.

### <a id="create-catalog" />Create a catalog from a share

To make the data in a share accessible to your team, you must create a catalog from the share or mount the share to an existing shared catalog. To create a catalog from a share, you can use Catalog Explorer, the Databricks Unity Catalog CLI, or SQL commands in a Databricks notebook or the Databricks SQL query editor. To mount the share to an existing shared catalog, you can use the Catalog Explorer.

**Permissions required to create a catalog**: A metastore admin, a user who has both the `CREATE CATALOG` and `USE PROVIDER` privileges for your Unity Catalog metastore, or a user who has both the `CREATE CATALOG` privilege and ownership of the provider object.

**Permissions required to mount share to an existing catalog**: A user must have the `USE PROVIDER` privilege or have ownership of the provider object, and must also either own the existing shared catalog or have the `MANAGE` privilege on the existing shared catalog.

**Limitations:** If you want to add a data product from [SAP Business Data Cloud (BDC)](https://docs.databricks.com/aws/en/opensharing/sap-bdc/index.md#what-is), serverless compute or Databricks Runtime 15 or above is required.

> [!NOTE]
>
> If you are creating a catalog from an [SAP BDC](https://docs.databricks.com/aws/en/opensharing/sap-bdc/index.md) share, SAP semantic metadata (table and column comments, primary keys, foreign keys, and governance tags) syncs automatically into the catalog. No additional action is required. For details, see [SAP BDC semantic metadata](https://docs.databricks.com/aws/en/opensharing/sap-bdc/semantic-metadata.md).

> [!NOTE]
>
> If the share includes views, you must use a catalog name that is different than the name of the catalog that contains the view in the provider's metastore.

#### Catalog Explorer

1. In your Databricks workspace, click ![Data icon.](https://docs.databricks.com/aws/en/images/product-icons/DataIcon.svg) **Catalog** to open Catalog Explorer.

2. At the top of the **Catalog** pane, click the ![Gear icon.](https://docs.databricks.com/aws/en/images/product-icons/GearIcon.svg) gear icon and select **OpenSharing**.

   Alternatively, in the upper-right corner, click **Share > OpenSharing**.

3. On the **Shared with me** tab, find and select the provider.

4. Find the desired share and click **Mount to catalog** on the share row.

5. Select **Create a new catalog** or **Mount to existing catalog** to add the data asset to an existing catalog.

6. Enter a name for your new catalog or choose which existing catalog to add the share to.

7. Click **Create** or **Mount**.

Alternatively, when you open Catalog Explorer, you can click **+ > Create Catalog** in the upper right to create a shared catalog. See [Create catalogs](https://docs.databricks.com/aws/en/catalogs/create-catalog.md).

#### SQL

Run the following command in a notebook or the Databricks SQL query editor.

```sql
CREATE CATALOG [IF NOT EXISTS] <catalog-name>
USING SHARE <provider-name>.<share-name>;
```

#### CLI

```bash
databricks catalogs create <catalog-name> /
--provider-name <provider-name> /
--share-name <share-name>
```

The catalog created from a share has a catalog type of OpenSharing. You can view the type on the catalog details page in Catalog Explorer or by running the [DESCRIBE CATALOG](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-syntax-aux-describe-catalog.md) SQL command in a notebook or Databricks SQL query. All shared catalogs are listed under **Catalog > Shared** in the Catalog Explorer left pane.

An OpenSharing catalog can be managed in the same way as regular catalogs on a Unity Catalog metastore. You can view, update, and delete an OpenSharing catalog using Catalog Explorer, the Databricks CLI, and by using `SHOW CATALOGS`, `DESCRIBE CATALOG`, `ALTER CATALOG`, and `DROP CATALOG` SQL commands.

The 3-level namespace structure under an OpenSharing catalog created from a share is the same as the one under a regular catalog on Unity Catalog: `catalog.schema.table`, `catalog.schema.volume`, or `catalog.schema.skill`.

Table and volume data under a shared catalog is read-only, which means you can perform read operations like:

* `DESCRIBE`, `SHOW`, and `SELECT` for tables.
* `DESCRIBE VOLUME`, `LIST <volume-path>`, `SELECT * FROM <format>.'<volume_path>'`, and `COPY INTO` for volumes.

Notebooks in a shared catalog can be previewed and cloned by any user with `USE CATALOG` on the catalog.

Models in a shared catalog can be read and loaded for inference by any user with the following privileges: `EXECUTE` privilege on the registered model, plus `USE SCHEMA` and `USE CATALOG` privileges on the schema and catalog containing the model.

### <a id="schema-table-permissions" />Manage permissions for the schemas, tables, and volumes in an OpenSharing catalog

By default, the catalog creator is the owner of all data objects under an OpenSharing catalog and can manage permissions for any of them.

Privileges are inherited downward, although some workspaces may still be on the legacy security model that did not provide inheritance. See [Privilege inheritance](https://docs.databricks.com/aws/en/data-governance/unity-catalog/access-control/permissions-concepts.md#inheritance). Any user granted the `SELECT` privilege on the catalog will have the `SELECT` privilege on all of the schemas and tables in the catalog unless that privilege is revoked. Likewise, any user granted the `READ VOLUME` privilege on the catalog will have the `READ VOLUME` privilege on all of the volumes in the catalog unless that privilege is revoked. You cannot grant privileges that give write or update access to an OpenSharing catalog or objects in an OpenSharing catalog.

The catalog owner can delegate the ownership of data objects to other users or groups, thereby granting those users the ability to manage the object permissions and life cycles.

For detailed information about managing privileges on data objects using Unity Catalog, see [Manage privileges in Unity Catalog](https://docs.databricks.com/aws/en/data-governance/unity-catalog/manage-privileges/index.md).

### Read data in a shared table

You can read data in a shared table using any of the tools available to you as a Databricks user: Catalog Explorer, notebooks, SQL queries, the Databricks CLI, and Databricks REST APIs. You must have the `SELECT` privilege on the table.

If your provider has shared the table `WITH HISTORY`, you can run transactions on the table. For more information about transaction requirements and limitations, see [Transactions](https://docs.databricks.com/aws/en/transactions/index.md).

### <a id="foreign-tables" />Read data in a shared foreign table or foreign schema

You can read data in a shared foreign table or foreign schema using any of the tools available to you as a Databricks user: Catalog Explorer, notebooks, SQL queries, the Databricks CLI, and Databricks REST APIs. You must have the `SELECT` privilege on the shared foreign table or foreign schema.

You can run transactions on shared foreign tables. See [transaction requirements and limitations](https://docs.databricks.com/aws/en/transactions/index.md#limitations).

There are additional costs when accessing a shared foreign table or foreign schema. For information on how sharing costs are computed, see [How do I incur and check OpenSharing costs?](https://docs.databricks.com/aws/en/opensharing/index.md#share-costs).

**Limitations**: You can't bypass cluster restriction to read shared foreign tables, even if the provider permits it.

### <a id="foreign-ice-tables" />Read data in a shared foreign Iceberg table

You can read data in a shared foreign Iceberg table using any of the tools available to you as a Databricks user: Catalog Explorer, notebooks, SQL queries, the Databricks CLI, and Databricks REST APIs. In Catalog Explorer, a shared foreign Iceberg table displays with a table type of **Foreign** and a data source format of **Iceberg**.

You have access to the source Iceberg location but can only perform the following types of queries:

* Snapshot queries
* Streaming queries

**Requirements**:

* You must have the `SELECT` privilege on the shared foreign Iceberg table.
* You must use Databricks Runtime 15.4 LTS or above.

### <a id="foreign-delta-tables" />Read data in a shared foreign Delta table

You can read data in a shared foreign Delta table using any of the tools available to you as a Databricks user: Catalog Explorer, notebooks, SQL queries, the Databricks CLI, and Databricks REST APIs. In Catalog Explorer, a shared foreign Delta table displays with a table type of **Foreign** and a data source format of **Delta**.

In Databricks-to-Databricks sharing, foreign Delta tables are always shared with full history and without a partition filter, so you always read the source Delta files directly using [cloud tokens](https://docs.databricks.com/aws/en/opensharing/create-share.md#cloud-token-eligibility).

**Requirements**:

* You must have the `SELECT` privilege on the shared foreign Delta table.
* You must use Databricks Runtime 16.4 LTS or above.

### <a id="volumes" />Read data in a shared volume

You can read data in a shared volume using any of the tools available to you as a Databricks user: Catalog Explorer, notebooks, SQL queries, the Databricks CLI, and Databricks REST APIs. You must have the `READ VOLUME` privilege on the volume.

### <a id="skills" />Use shared agent skills

> [!NOTE]
> **Beta**
>
> Using agent skills, including shared ones, is in [Beta](https://docs.databricks.com/aws/en/release-notes/release-types.md). Your account must have the **Enhanced Unity AI Gateway** preview turned on. See [ Manage account-level previews](https://docs.databricks.com/aws/en/admin/workspace-settings/manage-previews.md#account). Recipients don't need the **Agent Skill Sharing** preview.

Shared agent skills appear in the catalog you create from the share, alongside the provider's shared tables and volumes. The skill's name, comment, and contents come from the provider, and the skill is kept in sync with the original. Changes reach your workspace asynchronously. To use a shared skill, you need a grant on the shared catalog, the same as for shared tables and volumes. To learn how agents load skills, see [Tutorial: Discover and use Unity Gateway Skills](https://docs.databricks.com/aws/en/agents/uc-skills/use-uc-skills.md).

Shared skills are read-only. You can't edit a shared skill, upload files to it, comment on it, or delete it. Catalog Explorer hides these actions on shared skills. You also can't add a shared skill to another share.

For provider requirements and limitations, see [Add agent skills to a share](https://docs.databricks.com/aws/en/opensharing/create-share.md#skills).

### <a id="abac" />Read ABAC-secured data and apply ABAC policies

[Attribute-based access control (ABAC)](https://docs.databricks.com/aws/en/data-governance/unity-catalog/abac/index.md) is a data governance model that provides flexible, scalable, and centralized access control across Databricks.

Create ABAC policies on shared tables, views (Beta), materialized views, streaming tables, schemas, and catalogs created from a share. Materialized views and streaming tables are supported with [limitations](https://docs.databricks.com/aws/en/data-governance/unity-catalog/abac/requirements.md#materialized-views-and-streaming-tables). To create ABAC policies on shared views, enable the ABAC on views preview (Beta). You can't apply ABAC policies to metric views. To configure ABAC policies, see [Create and manage row filter and column mask policies](https://docs.databricks.com/aws/en/data-governance/unity-catalog/abac/policies.md).

### <a id="row-tracking" />Read row tracking columns in shared tables

If the data provider has enabled row tracking on a shared table, you can query the row tracking metadata columns. See [Row tracking in Databricks](https://docs.databricks.com/aws/en/tables/features/row-tracking.md) for a list of available columns.

How you access these columns depends on the type of table shared:

* **Tables shared with history and without partition filters**: You can query row tracking columns without restrictions.

* **Tables with partition filters or tables shared without history**: You must use Scala Spark and explicitly set the `responseFormat` option to `delta`.

  ```scala
  spark.read.option(“responseformat”, “delta”).table(“shared_table”).select(“_metadata.row_id”).show()
  ```

### Load a shared model for inference

For details on loading a shared model and using it for batch inference, see [Load model version by alias for inference workloads](https://docs.databricks.com/aws/en/machine-learning/manage-model-lifecycle/index.md#load-models-for-inference).

### Query a table's history data

If history is shared along with the table, you can query the table data as of a version or timestamp. Requires Databricks Runtime 12.2 LTS or above.

For example:

```sql
SELECT * FROM vaccine.vaccine_us.vaccine_us_distribution VERSION AS OF 3;
SELECT * FROM vaccine.vaccine_us.vaccine_us_distribution TIMESTAMP AS OF "2023-01-01 00:00:00";
```

In addition, if the change data feed (CDF) is enabled with the table, you can query the CDF. Both version and timestamp are supported:

```sql
SELECT * FROM table_changes('vaccine.vaccine_us.vaccine_us_distribution', 0, 3);
SELECT * FROM table_changes('vaccine.vaccine_us.vaccine_us_distribution', "2023-01-01 00:00:00", "2022-02-01 00:00:00");
```

For more information about change data feed, see [Use change data feed on Databricks](https://docs.databricks.com/aws/en/tables/features/change-data-feed.md).

### <a id="streaming-source" />Query a table using Apache Spark Structured Streaming

If a table is shared with history, you can use it as the source for Spark Structured Streaming. Requires Databricks Runtime 12.2 LTS or above.

Supported options:

* `ignoreDeletes`: Ignore transactions that delete data.
* `ignoreChanges`: Re-process updates if files were rewritten in the source table due to a data changing operation such as `UPDATE`, `MERGE INTO`, `DELETE` (within partitions), or `OVERWRITE`. Unchanged rows can still be emitted. Therefore your downstream consumers should be able to handle duplicates. Deletes are not propagated downstream. `ignoreChanges` subsumes `ignoreDeletes`. Therefore, if you use `ignoreChanges`, your stream will not be disrupted by either deletions or updates to the source table.
* `startingVersion`: The shared table version to start from. All table changes starting from this version (inclusive) will be read by the streaming source.
* `startingTimestamp`: The timestamp to start from. All table changes committed at or after the timestamp (inclusive) will be read by the streaming source. Example: `"2023-01-01 00:00:00.0"`
* `maxFilesPerTrigger`: The number of new files to be considered in every micro-batch.
* `maxBytesPerTrigger`: The amount of data that gets processed in each micro-batch. This option sets a “soft max”, meaning that a batch processes approximately this amount of data and might process more than the limit in order to make the streaming query move forward in cases when the smallest input unit is larger than this limit.
* `readChangeFeed`: Stream read the change data feed of the shared table.

Supported triggers:

* `Trigger.ProcessingTime`: The default trigger, used when no explicit trigger is specified. Data is processed in continuous micro-batches.
* `Trigger.AvailableNow`: The query captures the shared table's server-side version at start, processes the backlog as multiple micro-batches that honor `maxFilesPerTrigger` and `maxVersionsPerRpc`, and terminates when the captured version is exhausted. Requires Databricks Runtime 18.0 or above for `responseFormat=delta`; `responseFormat=parquet` additionally requires the bundled `delta-sharing-client` jar to be 1.4.0 or above (older versions fall back to a `Trigger.AvailableNow` wrapper that does not respect `maxVersionsPerRpc`).
* `Trigger.Once`: Deprecated; use `Trigger.AvailableNow` instead. On Databricks Runtime 17.3 and below, `Trigger.AvailableNow` is automatically converted to `Trigger.Once` because native `Trigger.AvailableNow` support requires Databricks Runtime 18.0 or above.

#### Sample Structured Streaming queries

##### Scala

```scala
spark.readStream.format("deltaSharing")
.option("startingVersion", 0)
.option("ignoreChanges", true)
.option("maxFilesPerTrigger", 10)
.table("vaccine.vaccine_us.vaccine_us_distribution")
```

##### Python

```python
spark.readStream.format("deltaSharing")\
.option("startingVersion", 0)\
.option("ignoreDeletes", true)\
.option("maxBytesPerTrigger", 10000)\
.table("vaccine.vaccine_us.vaccine_us_distribution")
```

If change data feed (CDF) is enabled with the table, you can stream read the CDF.

```scala
spark.readStream.format("deltaSharing")
.option("readChangeFeed", "true")
.table("vaccine.vaccine_us.vaccine_us_distribution")
```

### <a id="rls-cm" />Apply row filters and column masks

To apply row filters and column masks on tables and foreign tables shared by your data provider, see [Manually apply row filters and column masks](https://docs.databricks.com/aws/en/data-governance/unity-catalog/filters-and-masks/manually-apply.md). You cannot apply columns masks to streaming tables or materialized views.

## <a id="deletion-vectors" />Read tables with deletion vectors or column mapping enabled

Deletion vectors are a storage optimization feature that your provider can enable on shared Delta tables. See [Deletion vectors in Databricks](https://docs.databricks.com/aws/en/tables/features/deletion-vectors.md).

Databricks also supports column mapping for Delta tables. See [Rename and drop columns with Delta Lake column mapping](https://docs.databricks.com/aws/en/tables/features/column-mapping.md).

If your provider shared a table with deletion vectors or column mapping enabled, you can perform batch reads on the table using a SQL warehouse or a cluster running Databricks Runtime 14.1 or above. CDF and streaming queries require Databricks Runtime 14.2 or above.

You can perform batch queries as-is, because they can automatically resolve `responseFormat` based on the table features of the shared table.

To read a change data feed (CDF) or to perform streaming queries on shared tables with deletion vectors or column mapping enabled, set the additional option `responseFormat=delta`.

However, `responseFormat=delta` is optional in the following cases:

* You're on Databricks Runtime 16.4 or above and running a CDF query or a regular streaming query on shared tables with deletion vectors or column mapping enabled.
* You're on Databricks Runtime 17.3 or above and running a CDF streaming query.

The following examples show batch, CDF, and streaming queries:

```scala
import org.apache.spark.sql.SparkSession

// Batch query
spark.read.format("deltaSharing").table(<tableName>)

// CDF query
spark.read.format("deltaSharing")
  .option("readChangeFeed", "true")
  .option("responseFormat", "delta")
  .option("startingVersion", 1)
  .table(<tableName>)

// Streaming query
spark.readStream.format("deltaSharing").option("responseFormat", "delta").table(<tableName>)
```

## <a id="managed-iceberg" />Read shared managed Iceberg tables

Reading shared managed Iceberg tables is the same as [reading shared tables](https://docs.databricks.com/aws/en/opensharing/read-data-databricks.md#access-data), with these exceptions:

**Support in Databricks-to-Open sharing:**

The instructions in this article focus on reading shared data using Databricks user interfaces, specifically Unity Catalog syntax and interfaces. Due to the limitation on advanced Delta feature support for OpenSharing connectors, querying shared managed Iceberg tables using Python, Tableau, and Power BI is not supported.

**Change data feed:**

Change data feed is not supported for managed Iceberg tables.

**Databricks Iceberg limitations:**

Iceberg table and managed Iceberg table limitations apply. See [Limitations](https://docs.databricks.com/aws/en/iceberg/index.md#iceberg-limitations).

## <a id="views" />Read shared views

Reading shared views is the same as [reading shared tables](https://docs.databricks.com/aws/en/opensharing/read-data-databricks.md#access-data), with these exceptions:

**Shared views restrictions:**

* Shared views only support a subset of built-in functions and operators in Databricks. See [Functions supported in Databricks-to-Databricks view sharing](https://docs.databricks.com/aws/en/opensharing/shared-view-functions-data-databricks.md).
* Recipients can't query more than 20 shared views in a query in Databricks-to-Databricks sharing. The shared views can't be from more than five different provider-shares.
* When the provider is from the same account, or when you use serverless compute in a different account, you can't query multiple dependent views from the same provider in a single query.
  For example, if `view1` depends on `view2` on the provider side and both views are shared with you, you can't reference both `view1` and `view2` in the same query.
* You can run transactions on shared views. See [transaction requirements and limitations](https://docs.databricks.com/aws/en/transactions/index.md#limitations).

**Naming requirements:**

The catalog name that you use for the shared catalog that contains the view cannot be the same as any provider catalog that contains a table referenced by the view. For example, if the shared view is contained in your `test` catalog, and one of the provider's tables referenced in that view is contained in the provider's `test` catalog, the query will result in a namespace conflict error. See [Create a catalog from a share](https://docs.databricks.com/aws/en/opensharing/read-data-databricks.md#create-catalog).

**Query result timeout:**

If you don't have [direct access](https://docs.databricks.com/aws/en/opensharing/index.md#accessing-views) to the underlying data, Databricks performs on-the-fly materialization when querying the view. When this materialization takes longer than 5 minutes, the query times out. Switch to serverless compute to avoid this limitation.

**History and streaming:**

You cannot query history or use a view as a streaming source.

**View support in Databricks-to-Open sharing:**

The instructions in this article focus on reading shared data using Databricks user interfaces, specifically Unity Catalog syntax and interfaces. You can also query shared views using Apache Spark, Python, and BI tools like Tableau and Power BI.

**Costs:**

For information on how sharing costs are computed, see [How do I incur and check OpenSharing costs?](https://docs.databricks.com/aws/en/opensharing/index.md#share-costs).

## <a id="st-and-mv" />Read shared streaming tables and materialized views

Reading shared streaming tables and materialized views is the same as [reading shared tables](https://docs.databricks.com/aws/en/opensharing/read-data-databricks.md#access-data), with these exceptions:

**Support in Databricks-to-Open sharing:**

The instructions on this page focus on reading shared data using Databricks user interfaces, specifically Unity Catalog syntax and interfaces. You can also query shared streaming tables and materialized views using Apache Spark, Python, and BI tools like Tableau and Power BI. See [Read data shared with bearer tokens](https://docs.databricks.com/aws/en/opensharing/read-data-open.md).

**Transactions:**

* You can run transactions on shared materialized views and streaming tables. See [transaction requirements and limitations](https://docs.databricks.com/aws/en/transactions/index.md#limitations).

**SQL limitations**:

* The `current_recipient` function is not supported.
* The `DESCRIBE EXTENDED` command is not supported.

**Column mapping:**

If you are using classic compute when receiving a share from a different Databricks account, you must specify the `responseFormat` like below when querying a materialized view or streaming tables with column mapping.

```python
spark.read.option("responseFormat", "delta").table("catalog_name.schema_name.mv_name")
```

If you are using classic compute when sharing within the same Databricks account or serverless compute in any scenario, you can query without restrictions.

**Costs:**

For information on how sharing costs are computed, see [How do I incur and check OpenSharing costs?](https://docs.databricks.com/aws/en/opensharing/index.md#share-costs).

### Materialized view specific exceptions

**History:**

You cannot query history.

**Refresh:**

You cannot access the refresh status and refresh schedule of the materialized view.

**View and streaming table creation:**

You cannot create streaming tables on shared materialized views.

### Streaming table specific exceptions

**History:**

Querying history is available under the following Databricks-to-Databricks sharing circumstances:

* You are using serverless compute when sharing with a different Databricks account.

* You are using serverless or classic compute when sharing within the same Databricks account.

For more information on different computes, see [Compute](https://docs.databricks.com/aws/en/compute/index.md).

**Refresh:**

You cannot access the refresh status and refresh schedule of the streaming table.

## <a id="metric-views" />Read shared metric views

Reading shared metric views is the same as [reading shared views](https://docs.databricks.com/aws/en/opensharing/read-data-databricks.md#views), with these limitations:

* You can only query a shared metric view using serverless compute.
* You don't have access to the metric view definition or YAML.
* [Parameters](https://docs.databricks.com/aws/en/uc-semantics/metric-views/use-parameters.md) on shared parameterized metric views are usable in queries, but they are not discoverable through metadata commands and APIs. To learn which parameters a shared metric view accepts, contact the data provider.
* You cannot query a metric view that references tables with row filters or column masks. Contact the data provider if you need access.
* You cannot query a metric view that references tables governed by [ABAC policies](https://docs.databricks.com/aws/en/data-governance/unity-catalog/abac/index.md). Contact the data provider if you need access.

## <a id="python-udfs" />Read shared Python UDFs

Reading shared Python UDFs is the same as [reading shared tables](https://docs.databricks.com/aws/en/opensharing/read-data-databricks.md#access-data). After you create a new catalog for the share or mount the share to an existing catalog, you can access and use the Python UDF.

## <a id="featurespecs" />Use shared `FeatureSpecs` and models with automatic feature lookup

After you create a new catalog for the share or mount the share to an existing catalog, you can serve either of the following:

* Deploy a shared `FeatureSpec` to a Feature Serving endpoint. See [Serve feature tables](https://docs.databricks.com/aws/en/machine-learning/feature-store/feature-function-serving.md).
* Deploy a shared model with automatic feature lookup to a Model Serving endpoint. See [Model Serving with automatic feature lookup](https://docs.databricks.com/aws/en/machine-learning/feature-store/automatic-feature-lookup.md).

For both serving scenarios, the recipient catalog can have a different name from the provider catalog. Databricks automatically resolves shared feature dependencies through the recipient catalog.

For example, suppose a shared `FeatureSpec` or model with automatic feature lookup references the feature table `prod_features.customer_features.customer_profile`. If you name the recipient catalog `shared_features`, Databricks resolves the dependency as `shared_features.customer_features.customer_profile`.

### Requirements and limitations for Feature and Model Serving

The following requirements and limitations apply to both a shared `FeatureSpec` and a shared model with automatic feature lookup:

* **A shared `FeatureSpec` or model and all of its dependencies must be in the same share.** If the dependencies change, the provider must add the complete updated dependency set to the existing share. If the provider uses a new share, it must include the `FeatureSpec` or model and all old and new dependencies.
* **A shared `FeatureSpec` or model can't use recipient-created dependencies.** This restriction applies to feature tables and Unity Catalog functions created by the recipient.
* **Create online stores and serving endpoints in each region.** Before you serve a shared `FeatureSpec` through Feature Serving or a shared model through Model Serving, create an online store and publish the dependent tables in your workspace. Create the corresponding serving endpoint in every region where you use the shared `FeatureSpec` or model. For information about how to create online stores and publish tables, see [Databricks Online Feature Stores](https://docs.databricks.com/aws/en/machine-learning/feature-store/online-feature-store.md).

## <a id="preview-notebook-files" />Read shared notebooks

To preview and clone shared notebook files, you can use Catalog Explorer.

**Storage limitation:** If your storage uses Private Endpoints, you cannot read shared notebooks.

**Permissions required:** Catalog owner or user with the `USE CATALOG` privilege on the catalog created from the share.

1. In your Databricks workspace, click ![Data icon.](https://docs.databricks.com/aws/en/images/product-icons/DataIcon.svg) **Catalog**.
2. In the left pane, expand the **Catalog** menu, find and select the catalog created from the share.
3. On the **Other assets** tab, you'll see any shared notebook files.
4. Click the name of a shared notebook file to preview it.
5. (Optional) Click the **Clone** button to import the shared notebook file to your workspace.

   1. On the **Clone to** dialog, optionally enter a **New name**, then select the workspace folder you want to clone the notebook file to.
   2. Click **Clone**.
   3. Once the notebook is cloned, a dialog pops up to let you know that it successfully cloned. Click **reveal in the notebook editor** on the dialog to view it in the notebook editor.

   See [Databricks notebooks](https://docs.databricks.com/aws/en/notebooks/index.md).

## <a id="unmount-share" />Unmount a share

Unmount a share to remove the data asset from its catalog.

**Permissions required:** User with the `MANAGE` privilege on the shared catalog.

1. In your Databricks workspace, click ![Data icon.](https://docs.databricks.com/aws/en/images/product-icons/DataIcon.svg) **Catalog** to open Catalog Explorer.

2. At the top of the **Catalog** pane, click the ![Gear icon.](https://docs.databricks.com/aws/en/images/product-icons/GearIcon.svg) gear icon and select **OpenSharing**.

   Alternatively, in the upper-right corner, click **Share > OpenSharing**.

3. On the **Shared with me** tab, find and select the provider.

4. Click ![Kebab menu icon.](https://docs.databricks.com/aws/en/images/product-icons/OverflowIcon.svg) on the share row.

5. Click **Unmount share**.

6. Click **Unmount**.
