---
title: Convert external or foreign Delta Lake tables to Unity Catalog managed tables
description: Convert external or foreign Delta Lake tables to Unity Catalog managed tables with minimal downtime in Databricks using `ALTER TABLE SET MANAGED`.
canonical_url: https://docs.databricks.com/gcp/en/tables/convert-to-managed
---

# <a id="set-managed" />Convert external or foreign Delta Lake tables to Unity Catalog managed tables

Unity Catalog managed tables are the default and recommended table type in Databricks. Unity Catalog manages storage, layout, and maintenance for you, which lowers storage and compute costs while keeping tables optimized automatically. For a full description of managed tables and their benefits, see [Unity Catalog managed tables for Delta Lake and Apache Iceberg](https://docs.databricks.com/gcp/en/tables/managed.md).

To convert an external or foreign Delta Lake table to a Unity Catalog managed table in Databricks, use the [`ALTER TABLE ... SET MANAGED`](https://docs.databricks.com/gcp/en/sql/language-manual/sql-ref-syntax-ddl-alter-table.md#set-managed) command or, for external tables, Catalog Explorer. The conversion retains table configurations, including name, settings, permissions, and views, and retains table history.

The exact `SET MANAGED` syntax depends on whether your source table is external or foreign. Using the wrong syntax for your source type causes the command to fail. Before you convert, see [Choose the correct command for your source table](https://docs.databricks.com/gcp/en/tables/convert-to-managed.md#which-command).

For external table conversions, `SET MANAGED` also:

* Minimizes reader and writer downtime.
* Handles concurrent writes during conversion.
* Allows you to [roll back](https://docs.databricks.com/gcp/en/tables/convert-to-managed-rollback.md#rollback) a converted managed table to an external table.
* Redirects path-based reads and writes to allow legacy code to function after conversion.

Although you can also use `CREATE TABLE AS SELECT` (CTAS) to convert an external table to a managed table, Databricks recommends `SET MANAGED` for the preceding benefits.

## <a id="which-command" />Choose the correct command for your source table

External tables and foreign tables use different `SET MANAGED` syntax. Confirm your source table type in Catalog Explorer or with `DESCRIBE EXTENDED` before you convert, then use the matching command, as described in the following table:

| Source table type | Command                                      | Notes                                                                                                                                                                                                                                                                  |
| ----------------- | -------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| External          | `ALTER TABLE ... SET MANAGED`                | Don't add `MOVE` or `COPY`. See [the prerequisites](https://docs.databricks.com/gcp/en/tables/convert-to-managed.md#prereqs-ext) and [conversion instructions](https://docs.databricks.com/gcp/en/tables/convert-to-managed.md#convert-ext-sql).                       |
| Foreign           | `ALTER TABLE ... SET MANAGED {MOVE \| COPY}` | You must specify either `MOVE` or `COPY`. See [the prerequisites](https://docs.databricks.com/gcp/en/tables/convert-to-managed.md#prereqs-foreign) and [conversion instructions](https://docs.databricks.com/gcp/en/tables/convert-to-managed.md#convert-foreign-sql). |

The `MOVE` and `COPY` options are for foreign tables only, because an external catalog manages a foreign table's data and metadata. `MOVE` and `COPY` control whether that source table stays accessible after conversion. External tables have no external catalog to preserve, so this choice doesn't apply to them.

If you use the incorrect command for your source table type, Spark raises the following errors:

* If you add `MOVE` or `COPY` options when converting an external table, the command fails with `DELTA_ALTER_TABLE_SET_MANAGED_UNSUPPORTED_COPY_MOVE_SYNTAX`. To resolve, run `ALTER TABLE ... SET MANAGED` without either option.
* If you omit both `MOVE` and `COPY` when converting a foreign table, the command fails with `DELTA_ALTER_TABLE_SET_MANAGED_COPY_OR_MOVE_REQUIRED`. To resolve, add either `MOVE` or `COPY`.

## <a id="prerequisites" />Prerequisites

Prerequisites differ depending on whether you convert an external table or a foreign table.

### <a id="prereqs-ext" />External tables

Converting external tables to managed tables has the following prerequisites:

* **Format**: The table must use the Delta Lake format.
* **Runtime**: You must use Databricks Runtime 17.3 LTS or above or Serverless compute to use `SET MANAGED`, `UNSET MANAGED`, or `TRUNCATE UNIFORM HISTORY`.
* **Permissions**: `OWNER` or `MANAGE` permissions on the table.
* **Readers and writers**: Databricks recommends that readers and writers for your source tables use Databricks Runtime 15.4 LTS or above. If your readers or writers use Databricks Runtime 15.3 or below, see [Legacy readers and writers](https://docs.databricks.com/gcp/en/tables/convert-to-managed.md#legacy-readers-writers).
* **External clients**: External (non-Databricks) clients must support reads to Unity Catalog managed tables. See [Access tables with Delta clients](https://docs.databricks.com/gcp/en/external-access/index.md#delta-clients).
  * Use the [Access Insights](https://github.com/databrickslabs/access-insights) dashboard to see whether readers and writers accessing your tables are Databricks Runtime or external non-Databricks.
* **Feature compatibility**: If your table has `minReaderVersion=2`, `minWriterVersion=7`, and `tableFeatures={..., columnMapping}`, the `SET MANAGED` command fails with a `DELTA_TRUNCATED_TRANSACTION_LOG` error. Verify if your table has these properties using `DESCRIBE DETAIL`. See [Delta Lake feature compatibility and protocols](https://docs.databricks.com/gcp/en/tables/features/feature-compatibility.md).

After conversion, path-based reads and writes are automatically redirected to the new managed location with slight performance overhead. Databricks recommends migrating all path-based access to name-based access to avoid the performance overhead. See [Path-based redirect](https://docs.databricks.com/gcp/en/tables/convert-to-managed.md#path-redirect).

> [!IMPORTANT]
>
> To avoid conflicts, cancel any existing `OPTIMIZE` command jobs (liquid clustering, compaction, `ZORDER`) operating on your external table, and do not schedule any jobs while you convert your external tables to managed tables.

### <a id="prereqs-foreign" />Foreign tables

When converting a foreign table to a managed table, only foreign tables federated using [Hive metastore and Glue Federation](https://docs.databricks.com/gcp/en/query-federation/hms-federation-concepts.md) are supported.

Converting foreign tables to managed tables has the following prerequisites:

* **Data format**: The foreign table must use the Delta Lake format. To perform a one-time conversion for Parquet, see [Convert to Delta Lake](https://docs.databricks.com/gcp/en/ingestion/data-migration/convert-to-delta.md).
* **Runtime**: Databricks Runtime 17.3 or above.
* **Table type**: The Hive metastore (HMS) table type must be an external HMS table. The command fails if the table is a managed HMS table.
* **Permissions**: `OWNER` or `MANAGE` on the table, plus `USE CATALOG` on the parent catalog and `USE SCHEMA` on the parent schema. For `MOVE`, you also need `CREATE EXTERNAL TABLE` on the external location that covers the source table's path. `COPY` doesn't require any privilege on the external location.

To convert foreign tables to external tables, see [Convert a foreign table to an external Unity Catalog table](https://docs.databricks.com/gcp/en/tables/convert-foreign-external.md).

## <a id="downtime" />Downtime and data copy times

The `SET MANAGED` command minimizes or eliminates downtime compared to alternative approaches, such as [`DEEP CLONE`](https://docs.databricks.com/gcp/en/sql/language-manual/delta-clone.md).

### <a id="ext-downtime" />External tables

The conversion process for external tables uses a two-step approach:

1. **Initial data copy (no downtime)**: The command copies table data and Delta transaction log from the external location to the managed location. Active readers and writers to the external table run without interruption.
2. **Switch to managed location (brief downtime)**: Commits made to the external location during the first step are moved to the managed location, and the table metadata is updated to register the new managed location. During this step, all writes to the external location are temporarily blocked, resulting in writer downtime. Readers on Databricks Runtime 16.4 LTS or above experience no downtime, but readers on Databricks Runtime 15.4 LTS and below might experience downtime.

The following table shows estimated downtime based on the size of the source table and an estimated throughput rate of 0.5-2 GB/CPU core/minute:

| Table size     | Recommended cluster size          | Estimated data copy time | Estimated reader and writer downtime |
| -------------- | --------------------------------- | ------------------------ | ------------------------------------ |
| 100 GB or less | 32-core / X-Large SQL warehouse   | \~6 min or less          | \~1-2 min or less                    |
| 1 TB           | 64-core / 2X-Large SQL warehouse  | \~30 min                 | \~1-2 min                            |
| 10 TB          | 256-core / 4X-Large SQL warehouse | \~1.5 hrs                | \~1-5 min                            |

> [!NOTE]
>
> Downtime might vary based on factors such as file size, number of files, and number of commits.

### <a id="foreign-downtime" />Foreign tables

Foreign table conversion downtime depends on whether you use `MOVE` or `COPY`:

* For `MOVE`, downtime might occur as described for external tables. See [External tables](https://docs.databricks.com/gcp/en/tables/convert-to-managed.md#ext-downtime).
* For `COPY`, you are responsible for managing downtime because the conversion process copies the source table to the managed storage location, creating two separate copies of the data. You are responsible for disabling reads and writes to the source table in the external catalog, and migrating workloads to use the new managed table.

## <a id="convert" />Convert to a managed table

Convert an external table using Catalog Explorer or SQL, or convert a foreign table using SQL.

### <a id="convert-ext-catalogexp" />External tables using the Catalog Explorer (Beta)

> [!NOTE]
> **Beta**
>
> Converting external to managed tables using Catalog Explorer is in [Beta](https://docs.databricks.com/gcp/en/release-notes/release-types.md).

Using Catalog Explorer, you can convert one or more external tables in a schema at a time.

1. Go to the table or schema you want to convert in Catalog Explorer.

2. Under **About this table** (table detail page) or **About this schema** (schema detail page), click **Explore optimizations**.

   ![The About this table panel on a table's Overview page in Catalog Explorer, showing the Explore optimizations button below the table properties](https://docs.databricks.com/gcp/en/images/tables/convert-external-managed-about-this-table.png)

3. In the **Why migrate to Unity Catalog managed tables?** dialog, click **Continue**.

   ![The Why migrate to Unity Catalog managed tables dialog with the Continue button](https://docs.databricks.com/gcp/en/images/tables/convert-external-managed-dialog.png)

4. Select the external tables you want to convert. If you opened the dialog from a table detail page, Catalog Explorer pre-selects your table. Use the search bar to find additional tables. Managed tables are not selectable.

   ![Table selection page showing a pre-selected external table and an unavailable managed table](https://docs.databricks.com/gcp/en/images/tables/convert-external-managed-table-selection.png)

5. Click **Create conversion notebook**.

6. Optionally, enter a name for the notebook. By default, this saves the notebook to your home folder. Click **Browse** to save it to a different location.

   ![The Create conversion notebook dialog showing the name field and Browse option](https://docs.databricks.com/gcp/en/images/tables/convert-external-managed-create-notebook.png)

7. In the notebook, review the best practices and verify that you meet all [prerequisites](https://docs.databricks.com/gcp/en/tables/convert-to-managed.md#prerequisites).

8. Run the **SET MANAGED Queries** cell.

After the cell runs, the table type displays as **MANAGED** instead of **EXTERNAL** in Catalog Explorer. Refresh the page if the status doesn't update immediately.

### <a id="convert-ext-sql" />External tables using SQL

To convert an external table, use `SET MANAGED` without a `MOVE` or `COPY` option. Those options apply only to foreign tables. See [Choose the correct command for your source table](https://docs.databricks.com/gcp/en/tables/convert-to-managed.md#which-command).

Depending on whether your external table has [Apache Iceberg reads](https://docs.databricks.com/gcp/en/delta/iceberg-reads.md) enabled, run one of the following commands. To verify if your table has Iceberg reads enabled, see [Verify that Iceberg reads are enabled](https://docs.databricks.com/gcp/en/delta/iceberg-reads.md#verify).

* For Unity Catalog external tables without Iceberg reads enabled, run the following command:

  ```sql
  ALTER TABLE catalog.schema.my_external_table SET MANAGED;
  ```

  After conversion, you can enable Iceberg reads on your managed table without compatibility concerns.

* For Unity Catalog external tables with Iceberg reads already enabled, run the following command:

  ```sql
  ALTER TABLE catalog.schema.my_external_table SET MANAGED TRUNCATE UNIFORM HISTORY;
  ```

  Include `TRUNCATE UNIFORM HISTORY` to maintain optimal table performance and compatibility. `TRUNCATE UNIFORM HISTORY` truncates UniForm Iceberg history only and doesn't remove Delta history. This command results in a short read and write downtime for Iceberg after the truncation.

After table conversion, existing read and write streams fail. Restart streams with the same configurations to automatically use path-based redirect. Verify that your readers and writers work with the managed table. See [Streaming behavior](https://docs.databricks.com/gcp/en/tables/convert-to-managed.md#redirect-streams).

After conversion, the table inherits its predictive optimization setting from its schema and catalog. If predictive optimization is enabled for your account and you haven't turned it off for the schema or catalog, it's enabled for the converted table. See [Verify whether predictive optimization is enabled](https://docs.databricks.com/gcp/en/optimizations/predictive-optimization.md#check-po-enabled).

Databricks retains the data in your Unity Catalog external location for 14 days to allow rollback. See [Roll back a managed table conversion](https://docs.databricks.com/gcp/en/tables/convert-to-managed-rollback.md#rollback). After 14 days, with predictive optimization enabled, Databricks automatically deletes this data to reclaim storage and save costs. If you turn off predictive optimization, run `VACUUM` (requires Databricks Runtime 17.3 LTS or above or Serverless compute) on the newly converted managed table after 14 days to reclaim the storage yourself.

```sql
VACUUM my_converted_table
```

> [!NOTE]
>
> Even with predictive optimization enabled, data in your Unity Catalog external location might not be deleted after 14 days. For example, this can occur when the managed table is infrequently used or small. If the previous data remains, run `VACUUM` manually to remove it.
>
> Databricks deletes only the data in the external location. The Delta transaction log and reference to the table in Unity Catalog are kept.

### <a id="convert-foreign-sql" />Foreign tables using SQL

To convert a Unity Catalog foreign table to a Unity Catalog managed table, run `SET MANAGED`. Unlike external table conversions, a foreign table conversion requires you to specify either `MOVE` or `COPY`. If you omit both, the command fails with `DELTA_ALTER_TABLE_SET_MANAGED_COPY_OR_MOVE_REQUIRED`. Run the following command, where `source_table` is an existing foreign table federated in Unity Catalog:

```sql
ALTER TABLE source_table SET MANAGED {MOVE | COPY}
```

* **source\_table**

  An existing foreign table federated in Unity Catalog.

Choose `MOVE` or `COPY` based on whether the source table must stay accessible in the external catalog after conversion, as described in the following table:

| Behavior                 | `MOVE`                                                                                                                        | `COPY`                                                                                                                                                                                                                                                                                                                                   |
| ------------------------ | ----------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| What the conversion does | Converts the table to managed and disables access to the source table in the external catalog.                                | Converts the table to managed without modifying or disabling access to the source table in the external catalog. The conversion copies data from the source table into the managed storage location defined for the foreign table. This creates two separate copies: the new managed table and the source table in the external catalog. |
| Access after conversion  | Access through the external catalog and path-based access fail. All readers and writers must use the Unity Catalog namespace. | You are responsible for disabling reads and writes to the source table in the external catalog and making sure that workloads have migrated to the new catalog.                                                                                                                                                                          |

After a `MOVE` conversion, readers and writers must use the Unity Catalog namespace, as in the following example:

```sql
SELECT * FROM catalog_name.schema_name.table_name;
```

Path-based access, such as in the following example, fails after a `MOVE` conversion:

```sql
SELECT * FROM delta.`protocol://path/to/table`;
```

For `MOVE`, the reader and writer version and client-compatibility requirements are the same as described in [Prerequisites](https://docs.databricks.com/gcp/en/tables/convert-to-managed.md#prerequisites) and [Legacy readers and writers](https://docs.databricks.com/gcp/en/tables/convert-to-managed.md#legacy-readers-writers).

For both `MOVE` and `COPY`, consider the following:

* After table conversion, you must restart any streaming jobs (read or write) using the foreign table and verify that your readers and writers work with the managed table.
* Before conversion, if you drop the source table in the external catalog, Unity Catalog also drops the foreign table. After you convert the table to managed, dropping the source table in the external catalog does not affect the Unity Catalog managed table.
* If the command is interrupted while copying data, restart it. The command resumes from where it left off.
* Databricks doesn't automatically enable predictive optimization on the converted table. It sets predictive optimization to `INHERIT`. To check whether predictive optimization is enabled, see [Verify whether predictive optimization is enabled](https://docs.databricks.com/gcp/en/optimizations/predictive-optimization.md#check-po-enabled).

> [!WARNING]
>
> Databricks recommends that you avoid running multiple `SET MANAGED` commands concurrently on the same table, which can lead to an inconsistent table state.

### <a id="check-conversion" />Verify conversion

To verify that your table converted to a managed table successfully, check whether the table `Type` is `MANAGED`. You can do either of the following:

* Open a new tab and go to the Catalog Explorer. In the **Details** tab, under **About this table**, the table **Type** displays as **Managed**.
* For external tables, check the table `Type` by running the following SQL command:

  ```sql
  DESCRIBE EXTENDED catalog_name.schema_name.table_name
  ```

  To check foreign tables, check multiple tables in one query, or script the check, query `information_schema.tables` instead:

  ```sql
  SELECT table_type FROM system.information_schema.tables
  WHERE table_catalog = 'catalog_name' AND table_schema = 'schema_name' AND table_name = 'table_name';
  ```

> [!NOTE]
>
> Don't use `DESCRIBE EXTENDED` to verify foreign table conversions. It shows the table `Type` as `EXTERNAL`, regardless of the table's actual state. For details, see [Verify a foreign table rollback](https://docs.databricks.com/gcp/en/tables/convert-to-managed-rollback.md#verify-foreign-rollback).

If the conversion fails, see [Troubleshoot conversion failures](https://docs.databricks.com/gcp/en/tables/convert-to-managed-rollback.md#troubleshooting).

### <a id="legacy-readers-writers" />Legacy readers and writers

Databricks recommends upgrading all readers and writers to Databricks Runtime 15.4 LTS or above to use the full capabilities of `SET MANAGED`, including table history retention.

You can still use `SET MANAGED` if you have readers or writers on Databricks Runtime 15.3 or below. However, after converting to a managed table, you can time travel to historical commits only by version, and not by timestamp.

If you roll back to an external table within 14 days, time travel to historical commits made before conversion is re-enabled. Time travel using timestamps isn't supported for commits made to the converted managed table between conversion and rollback. See [Roll back a managed table conversion](https://docs.databricks.com/gcp/en/tables/convert-to-managed-rollback.md#rollback).

Writing to a table after conversion with Databricks Runtime 15.3 or below requires dropping the [`inCommitTimestamp` feature](https://docs.databricks.com/gcp/en/tables/history.md#in-commit-timestamps):

```sql
ALTER TABLE <table_name> DROP FEATURE inCommitTimestamp;
```

## <a id="path-redirect" />Path-based redirect

In Databricks Runtime 18.1 and above, after you convert an external table to a Unity Catalog managed table, path-based reads and batch writes to the previous external location automatically redirect to the new managed location. A path-based read is code such as `` SELECT * FROM delta.`/path/to/my_table` ``. Path-based redirect reduces the time and effort required to migrate to managed tables by allowing legacy code that uses storage paths to continue working without refactoring.

Path-based streaming writes require Databricks Runtime 18.2 and above. See [Streaming behavior](https://docs.databricks.com/gcp/en/tables/convert-to-managed.md#redirect-streams).

Foreign table conversions don't redirect path-based access.

For low latency use cases, Databricks recommends that you migrate path-based access to name-based access. Path-based redirect adds several hundred milliseconds of overhead for each path-based read or write, and requires that old Delta logs remain active in your Unity Catalog external location. Name-based reads and writes do not have additional performance overhead. See [Migrate path-based code to name-based](https://docs.databricks.com/gcp/en/tables/convert-to-managed.md#migrate-name).

### <a id="migrate-name" />Migrate path-based code to name-based

If you decide not to use path-based redirect, you can migrate legacy code. To migrate, replace path-based references with name-based references.

The following code example contains a path-based table reference to files:

```sql
SELECT * FROM delta.`/path/to/customers_table`;
```

Replace the path-based reference with a name-based reference to an external table, as in the following code:

```sql
SELECT * FROM catalog_name.schema_name.customers_table;
```

### <a id="redirect-streams" />Streaming behavior

Streaming with path-based redirect supports reads and writes in the following Databricks Runtime versions:

* Reads are supported in Databricks Runtime 18.1 and above.
* Writes are supported in Databricks Runtime 18.2 and above.

After conversion, you must restart all streaming jobs to avoid reading from or writing to the previous table location.

Path-based streaming reads and writes fail and stop on the next checkpoint with a migration message:

* For reads, the stream raises an error: `DELTA_STREAMING_INTERRUPTED_BY_MANAGED_TABLE_CONVERSION: The table at <path> has been converted to a Unity Catalog managed table. The stream has been stopped to ensure data consistency. Restart the stream and it will automatically resume from the last committed offset using the converted table`.
* For writes, the first micro-batch after the conversion raises an error: `Operation not allowed: STREAMING WRITE cannot be performed on a table with redirect feature. The no redirect rules are not satisfied []`.

To resolve errors, restart streams with the same configurations. Path-based access automatically redirects to the managed table.

For path-based redirect limitations, see [Limitations](https://docs.databricks.com/gcp/en/tables/convert-to-managed.md#known-limitations).

## <a id="troubleshooting" />Troubleshoot or roll back a conversion

<a id="rollback" />

<a id="check-rollback" />

<a id="dbr-version-consistency" />

<a id="cluster-shutdown" />

<a id="corrupted-external-table" />

To resolve a failed conversion, roll back a converted table, or verify a rollback, see [Troubleshoot and roll back managed table conversions](https://docs.databricks.com/gcp/en/tables/convert-to-managed-rollback.md).

## Advanced topics

This section contains advanced topics for converting foreign and external tables to managed tables.

### Convert at the schema or catalog level

You have the following two options to automate converting tables at the schema or catalog level:

* Iterate through your tables in your schemas to convert each table individually.
* Use the discoverx labs project to convert entire schemas or catalogs at once:

  ```python
  df = (dx.from_tables("prod.*.*")
  .with_sql("ALTER TABLE {full_table_name} SET MANAGED;")
  .apply())
  ```

See [Databricks Labs](https://www.databricks.com/learn/labs) and [discoverx](https://github.com/databrickslabs/discoverx).

### Create tables in a foreign catalog

You can create external or managed tables in a foreign catalog. The behavior depends on the schema configuration:

* **For Glue or eHMS schemas**, or **for schemas with a managed location set in Unity Catalog**: If you run `CREATE TABLE foreign_catalog.schema.table`, this creates a Unity Catalog managed or external table. Databricks doesn't push or sync the table to the external catalog.
* **For schemas from internal Hive metastore connections**: If you try to create a table in a foreign schema, it still creates a foreign table and also creates a table in `hive_metastore`.
* **For legacy workspace Hive metastore**: Because this has read and write federation, if you create a table in the foreign catalog, it also creates a table in the internal Hive metastore.

### DBFS-backed foreign tables

When converting a DBFS-backed table, Databricks stores the current mapping of the DBFS path as the external table's cloud path location.

## <a id="known-limitations" />Limitations

Converting external or foreign tables to managed tables has the following limitations:

* Table history for commits made after conversion but before rollback allows for time travel by version but not by timestamp.

* OpenSharing is not fully compatible with the `SET MANAGED` command. Open OpenSharing is supported, but Databricks-to-Databricks sharing doesn't automatically update the recipient table's managed location. The recipient continues to read from the old location until you reshare the table. To reshare the table, run the following commands:

  ```sql
  ALTER SHARE <share_name> REMOVE TABLE <table_name>;
  ALTER SHARE <share_name> ADD TABLE <table_name> AS <table_share_name> WITH HISTORY;
  ```

* If the default managed location of your Unity Catalog metastore, catalog, or schema is in a different cloud region from the source table's storage location, you might incur additional cross-region data transfer costs from your cloud provider.

  To verify the location of your schema and catalog, run the following commands:

  ```sql
  DESC SCHEMA EXTENDED <catalog_name>.<schema_name>;

  DESC CATALOG EXTENDED <catalog_name>;
  ```

  To verify the location of your metastore, run either of the following commands:

  ```sql
  DESC METASTORE; -- Option 1
  SELECT * FROM system.information_schema.metastores; -- Option 2
  ```

Path-based redirect limitations:

* You must restart any streaming jobs after conversion. See [Streaming behavior](https://docs.databricks.com/gcp/en/tables/convert-to-managed.md#redirect-streams).
* Path-based redirect only has backward compatibility for the migration process and doesn't enable new path-based access to Unity Catalog managed tables.

Foreign table limitations:

* Only foreign tables federated using [Hive metastore and Glue Federation](https://docs.databricks.com/gcp/en/query-federation/hms-federation-concepts.md) are supported for conversion.
