Create OneLake shortcuts

OneLake is a single, unified, logical data lake for Microsoft Fabric to store lakehouses, warehouses, KQL databases, and other items. Shortcuts are embedded references within OneLake that point to other files' store locations without moving the original data. The embedded reference makes it appear as though the files and folders are stored locally but in reality; they exist in another storage location. Shortcuts can be updated or removed from your items, but these changes don't affect the original data and its source. For more information, see OneLake shortcuts.

In this article, you learn how to create a OneLake shortcut from internal and external sources to query your data in Real-Time Analytics. Select the desired tab that corresponds with the shortcut you'd like to create.

Note

Use OneLake shortcuts when you want to infrequently run queries on historical data without partitioning or indexing the data. If you want to run queries frequently and accelerate performance, import the data directly into your KQL database.

Prerequisites

To access the data in your KQL database in other Microsoft Fabric experiences, see One logical copy.

Create shortcut

  1. Browse to an existing KQL database.

  2. Select New > OneLake shortcut.

    Screenshot of the Home tab showing the dropdown of the New button. The option titled OneLake shortcut is highlighted.

Select a source

  1. Under Internal sources, select Microsoft OneLake.

    Screenshot of the New shortcut window showing the two methods for creating a shortcut. The option titled OneLake is highlighted.

  2. Select the data source you want to connect to, and then select Next.

    Screenshot of the Select a data source type window showing the available data sources to use with the shortcut. The Next button is highlighted.

  3. Expand Files or Tables, and select one or more subfolders to connect to, then select Next.

    Screenshot of the New shortcut window showing the data in the LakeHouse. The subfolder titled StrmSC and the Create button are highlighted.

  4. Review your selected shortcut locations. Use the edit action to change the default shortcut name. Use the delete action to remove any undesired selections. Select Create to generate shortcuts.

    Screenshot of the New shortcut window showing selected shortcut locations and providing the option to delete or rename selections.

  5. Select Close.

Note

You can select up to 50 subfolders when creating OneLake shortcuts.

The database refreshes automatically. The shortcut appears under Shortcuts in the Explorer pane.

Screenshot of the Explorer pane showing the new shortcut.

The OneLake shortcut has been created. You can now query this data.

Query data

To query data from the OneLake shortcut, use the external_table() function.

  1. On the rightmost side of your database, select Explore your data. The window opens with a few example queries you can run to get an initial look at your data.
  2. Replace the table name placeholder with external_table('Shortcut name').
  3. Select Run or press Shift+ Enter to run a selected query.

Screenshot of the Explore your data window showing the results of an example query.