Create a database shortcut

A database shortcut in Real-Time Intelligence provides read-only access to data in another KQL database or an Azure Data Explorer database without ingesting the data again. You can include all subitems from the source database or select specific tables, shortcut tables, materialized views, and functions.

In this article, you create a database shortcut and choose which subitems to include. Use table-level sharing when consumers need only part of a source database.

Prerequisites

When is a database shortcut useful?

If you have data in an Azure Data Explorer database and want to use this data in Real-Time Intelligence, create a database shortcut to expose this data. This feature is also useful to segregate compute resources to protect a production environment from nonproduction use cases. You can also use a database shortcut to associate the costs with the party that runs queries on the data.

By using table-level sharing, you can expose a curated set of subitems to another team without exposing the rest of the source database. Consumers can query and view only the subitems included in the share.

How does a database shortcut work?

The owner of the source database, the data provider, shares the database with the creator of the shortcut in Real-Time Intelligence, the data consumer. The owner and the creator can be the same person.

The database shortcut connects in read-only mode, so you can view and run queries on the shared data that the source database ingested. Because of synchronization, there's a data lag of a few seconds to a few minutes in data availability. The length of the time lag depends on the overall size of the source database metadata.

The source and database shortcuts use the same storage account to fetch the data. The source database owns the storage. The database shortcut views the data without needing to ingest it. Since the database shortcut is a read-only database, you can't modify the data, tables, and policies in the database except for caching policy, principals, and permissions.

Create database shortcut

A data consumer can select a source KQL database from the OneLake catalog, enter a cluster URI and database name, or use an invitation link from an Azure Data Explorer data provider. For the OneLake catalog and cluster URI methods, use Shared entities to choose all or specific subitems. With an invitation token, the data provider defines the shared subitems.

The data consumer can control how much data is cached by setting the cache policy. The main implications of setting the hot cache policy are:

  • Cost: The cost of cold cache can be dramatically lower than the cost of hot cache.
  • Performance: Data in hot cache is queried faster, particularly for range queries that scan large amounts of data.

Important

The database shortcut setup requires a high level of trust between the involved parties, such as the leader database and the database shortcut (follower). You can establish the database shortcut even if the leader cluster is behind a virtual network (VNet) or has public access disabled. Ensure that you thoroughly review and accept the security posture of this setup.

Select the tab that corresponds with the way you'd like to create a shortcut.

Use the OneLake catalog to select a source KQL database in Fabric.

Create a shortcut with the OneLake catalog

To create a shortcut from a KQL database in the OneLake catalog:

  1. Browse to your workspace in Microsoft Fabric.
  2. Open a new or existing eventhouse.
  3. Select the plus sign next to KQL databases.
  4. Enter a name for your database shortcut.
  5. Select Type > New shortcut database (Follower), and then select Next.
  6. Select Method > OneLake catalog.
  7. Browse to and select the source KQL database.
  8. In Shared entities, keep All entities selected or select specific subitems. For selection behavior and dependencies, see Select shared entities.
  9. Optionally, modify the default cache policy.
  10. Select Create.

When you create the shortcut, you're taken to the database details view of the new database shortcut.

Screenshot of resulting database shortcut in Real-Time Intelligence.

Select shared entities

For the OneLake catalog and cluster URI methods, select the subitems to include before you create the database shortcut:

  1. Open Shared entities. By default, All entities is selected.

  2. To share a subset, search by name or expand an entity type, and select the subitems you want to include. You can select tables, shortcut tables, materialized views, and functions.

    Screenshot of the Shared entities picker with tables, materialized views, and functions.

Only subitems you have permission to share are available for selection. Review the selection before you select Create, because dependencies can change which subitems are included:

  • When you select a materialized view or function, its referenced tables are automatically selected.
  • When you deselect a materialized view or function, its referenced tables remain selected.
  • When you deselect a table, materialized views or functions that depend on it are automatically deselected.

Note

To query a shared shortcut table or view its metadata, you need permissions for both the followed database and the shortcut table's source data. The same requirements apply to functions and materialized views that refer to shortcut tables.

When you include all entities, the database shortcut automatically synchronizes additions and removals of source subitems. When you select a subset, newly created source subitems aren't automatically added to the share. This selection is separate from schema synchronization for individual shortcut tables. For details, see Automatic schema sync.

After you create the database shortcut, check its contents and query the shared subitems. Names of subitems that aren't included in the share aren't visible to consumers.

Delete database shortcut

  1. Within your workspace, find the KQL database shortcut you want to delete.

  2. Select the More menu [...] > Delete.

    Screenshot of deleting item of database shortcut.

You deleted your database shortcut. Once you delete a database, you can't recover it. However, you can create a new database shortcut from the same source database.