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.
OneLake shortcuts in a KQL database let you query data in internal Fabric items and external storage without moving the data. In a KQL database, each shortcut appears under Shortcuts and is queried as an external table in a KQL queryset by using the external_table() function.
In this article, you learn how to create a OneLake shortcut in a KQL database that points to internal Fabric or external sources. You can't rename shortcuts created in a KQL database, and you can create only one shortcut at a time.
For general information about shortcut types, source-specific instructions, and broader limitations, see OneLake shortcuts.
Note
To improve query performance over supported shortcuts, see Query acceleration over OneLake shortcuts.
Prerequisites
- A workspace with a Microsoft Fabric-enabled capacity.
- A KQL database with edit permissions.
- A lakehouse.
To access the data in your KQL database in other Microsoft Fabric experiences, see One logical copy.
Create a shortcut
Browse to an existing KQL database.
Select + > New > OneLake shortcut.
Select a source
KQL databases support shortcuts to internal OneLake resources, such as KQL databases, lakehouses, and warehouses, and to external resources, such as Azure Data Lake Storage, Amazon S3, and Google Cloud Storage. For a full list of supported shortcut types and source-specific configuration guidance, see Types of shortcuts.
- In the New shortcut window, choose the source type that you want to connect to.
- Complete the required connection details for the source, and then select the folder or table that you want to expose in the KQL database.
- Optional: To enable query acceleration on the new shortcut, set Accelerate to On.
- Select Create.
For supported scenarios and limitations, see Query acceleration for OneLake shortcuts - overview.
Note
- You can only connect to one subfolder or table per shortcut. To connect to more data, create additional shortcuts.
- You can't create a shortcut over a table that has an asterisk (
*) in any column name. Rename the columns before you create the shortcut.
After you create the shortcut, the database refreshes automatically. The shortcut appears under Shortcuts in the Explorer pane. You can now query the data.
Organize shortcuts with folders
To create a subfolder or move to an existing folder:
- In the explorer pane, either:
- Right-click on the shortcut and select Move to folder > + New folder.
- Or, select the ellipsis (...) next to the specific shortcut and select Move to folder > + New folder or choose an existing folder.
- Right-click on the shortcut and select Move to folder > + New folder.
- To create a folder, enter a name for the folder and select Create. The shortcut is moved to the new folder.
- To move more than one shortcut, either enter another folder name or select the dropdown menu and check the boxes next to the shortcuts you want to move to the same folder.
- You can also move shortcuts to an existing folder. To do so, select Move to folder and then select the folder you want to move the shortcut to, or drag and drop the shortcut into the folder.
Note
- If you delete a subfolder, the shortcuts within the folder aren't deleted but are moved back to the parent folder.
- A subfolder is automatically deleted when there are no shortcuts within the folder.
- Folders can be created per asset type and the name must be unique per asset type. For example, you can have a table folder and a shortcuts folder with the same name, but you can't have two shortcuts folders with the same name.
Query data
To query data from the OneLake shortcut, use the external_table() function.
- On the right 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.
- Replace the table name placeholder with
external_table('<shortcut-name>'). - Select Run or press Shift + Enter to run a selected query.
Data type mapping
Delta Parquet to Eventhouse data type mapping
Delta primitive data types map to Eventhouse scalar data types as shown in the following table. For more information, see Scalar data types.
| Delta type | Eventhouse scalar data type |
|---|---|
string |
string |
long |
long |
integer |
int |
short |
int |
byte |
real |
float |
real |
double |
real |
decimal |
decimal |
boolean |
bool |
binary |
string |
date |
datetime |
timestamp_ntz (without time zone) |
datetime |
struct |
dynamic |
array |
dynamic |
map |
dynamic |