# QuickTip: Querying KQL Tables From Other Workspaces In Fabric

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1731521547292/9168c509-694c-4b8e-a2fe-6d0d0c17b534.png align="center")

In Fabric, if you want to query a delta table from a lakehouse in another workspace, you create a shortcut to that table. Similarly, in Eventhouse, you can also create shortcuts to Eventhouses in other workspaces, but the option might not be immediately obvious in the GUI. If you click on New &gt; OneLake shortcut, it creates a shortcut to a delta table, not an Eventhouse.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1731291796279/84a524a9-8cb7-47c2-9c03-767553f654c4.png align="center")

You have two options if you want to query a table from Eventhouse1 in Workspace A from Evenethouse2 in Workspace B.

You will need three things about the Eventhouse/table you want to shortcut:

* ClusterURI : You can either get that from the UI or by using KQL : `print current_cluster_endpoint()` .
    
* Database name
    
* Table name
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1731533964642/f1190f22-6f1f-4982-8573-66a4925ab0d2.png align="center")

## Using UI:

[Create a database shortcut](https://learn.microsoft.com/en-us/fabric/real-time-intelligence/database-shortcut?tabs=workspace) by selecting + Database &gt; New shortcut database (follower). Then enter the cluster URI, select database. Optionally you can also set the caching policy for hot cache. This will add the database as a shortcut along with all its tables.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1731534019718/464afd20-0e45-465d-94a6-182b9d338136.gif align="center")

## Programmatically

You can also query specific tables from another cross-workspace Eventhouse using

```python
let ClusterUri = "https://<cluster_guid>.z1.kusto.fabric.microsoft.com";
let DatabaseName = "<kqldbname>";
let KQLTableName = "<table>";

let _mytable = 
    cluster(ClusterUri).database(DatabaseName).table(KQLTableName)
    | summarize 
        avg_temp = avg(Temperature), 
        avg_humidity = avg(Humidity) 
    by Occupancy;

_mytable 
```

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1731534830654/e985d582-415c-44b1-9f19-1f41432c445c.png align="center")

Using the above method you can perform cross-cluster joins and unions.

***Why is this important ?*** Well, you will see next week !

## Reference:

* [Cross-cluster and cross-database queries - Kusto | Microsoft Learn](https://learn.microsoft.com/en-us/kusto/query/cross-cluster-or-database-queries?view=microsoft-fabric)
