<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Automate creating shortcusts in Data Engineering</title>
    <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Automate-creating-shortcusts/m-p/4840556#M12677</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="79747" data-lia-user-login="AstridM" class="lia-mention lia-mention-user"&gt;AstridM&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The 404 Not Found error occurs because your lakehouse is schema-enabled, which is the case for those created automatically by Synapse Link as well.&lt;/P&gt;
&lt;P&gt;In schema-enabled lakehouses, tables are not available directly under the /tables endpoint, so the call fails. Instead, you should first use the GET /schemas API to list the available schemas in the lakehouse, and then call GET /schemas/{schemaName}/tables to retrieve the tables within each schema.&lt;/P&gt;
&lt;P&gt;Once you have the table names, you can loop through them and create the shortcuts using the OneLake Shortcuts API, setting the path to Tables/&amp;lt;tableName&amp;gt; in your destination lakehouse. This approach works for both system-created and manually created schema-enabled lakehouses.&lt;/P&gt;
&lt;P&gt;For details, please refer to the documentation: &lt;A href="https://learn.microsoft.com/en-us/rest/api/fabric/core/onelake-shortcuts" target="_blank"&gt;OneLake Shortcuts - REST API (Core) | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Hope this helps. Please feel free to rech out for any further questions.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;Thank you .&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 02 Oct 2025 10:07:59 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2025-10-02T10:07:59Z</dc:date>
    <item>
      <title>Automate creating shortcusts</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Automate-creating-shortcusts/m-p/4835734#M12521</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a lakehouse that get data from the dataverse (F&amp;amp;O) and has like 1,000+ tables, and that is my main source of data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I create shortcust to other lakehouses from my main lakehouse. (the main lakehouse was created by the system when I enabled azure synapse link&amp;nbsp; - fabric), and the rest were created by me, and they are all schema enabled.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have been trying to create a notebook/powershell/cli, something that will let me create shortcuts from another lakehouse to my main one, without seaching table by table, as there is not really a search option, and you need to scroll down.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;curl -X POST "https://api.fabric.microsoft.com/v1/workspaces/&amp;lt;workspaceid&amp;gt;/items/&amp;lt;lakehouseid&amp;gt;/shortcuts" ^
-H "Authorization: Bearer YOUR_TOKEN_HERE" ^
-H "Content-Type: application/json" ^
-d "{\"name\":\"custtable\",\"path\":\"Tables/custtable\",\"target\":{\"oneLake\":{\"workspaceId\":\"&amp;lt;workspaceid&amp;gt;\",\"itemId\":\"&amp;lt;lakehouseid&amp;gt;\",\"path\":\"Tables/custtable\",\"itemType\":\"Lakehouse\"}}}"&lt;/LI-CODE&gt;&lt;P&gt;The closest I came to being able to create a short cut is with cli, but it creates a schema with the table name.&lt;/P&gt;&lt;P&gt;And ideas, on how to?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Sep 2025 18:45:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Automate-creating-shortcusts/m-p/4835734#M12521</guid>
      <dc:creator>AstridM</dc:creator>
      <dc:date>2025-09-25T18:45:03Z</dc:date>
    </item>
    <item>
      <title>Re: Automate creating shortcusts</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Automate-creating-shortcusts/m-p/4835931#M12527</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="79747" data-lia-user-login="AstridM" class="lia-mention lia-mention-user"&gt;AstridM&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You are on the right track. The way to automate this at scale is:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;enumerate the source lakehouse tables, and&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;loop over them calling the Fabric REST API to create shortcuts in your destination lakehouse under Tables/&amp;lt;tableName&amp;gt;.&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;Use the Lakehouse Tables API to list table names from your source lakehouse. Then POST to the OneLake Shortcuts API for each name, setting path to Tables/&amp;lt;tableName&amp;gt; and target.oneLake to the source item.&lt;/P&gt;Docs: &lt;A href="https://learn.microsoft.com/en-us/rest/api/fabric/lakehouse/tables/list-tables" target="_blank" rel="noopener"&gt;List Tables&lt;/A&gt;, &lt;A href="https://learn.microsoft.com/en-us/rest/api/fabric/core/onelake-shortcuts/create-shortcut" target="_blank" rel="noopener"&gt;Create Shortcut&lt;/A&gt;, &lt;A href="https://learn.microsoft.com/en-us/fabric/onelake/onelake-shortcuts" target="_blank" rel="noopener"&gt;OneLake shortcuts overview&lt;/A&gt;.&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;If you prefer to do this inside a Fabric notebook, you can fetch a bearer token with mssparkutils.credentials.getToken("&lt;A href="https://api.fabric.microsoft.com/" target="_blank" rel="noopener"&gt;https://api.fabric.microsoft.com/&lt;/A&gt;") and call the REST APIs in a loop. Community confirmation: &lt;A href="https://community.fabric.microsoft.com/t5/Data-Engineering/MS-Fabric-Bearer-Token-retreaving/m-p/4402015" target="_blank" rel="noopener"&gt;thread on getting tokens in notebooks&lt;/A&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;CLI confusion that creates a schema-like folder usually comes from using a path like Tables/schema/table. For lakehouse tables, point shortcuts directly to Tables/&amp;lt;tableName&amp;gt;. This places the shortcut in the Tables tree and makes it queryable in SQL Endpoint. See: &lt;A href="https://learn.microsoft.com/en-us/fabric/onelake/create-onelake-shortcut" target="_blank" rel="noopener"&gt;Create and manage a OneLake shortcut&lt;/A&gt;.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;Example: Python in a Fabric notebook (Not tested, but should at least get you most of the way there)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;LI-CODE lang="python"&gt;import requests

workspace_id_src="&amp;lt;source_ws&amp;gt;"
lakehouse_id_src="&amp;lt;source_lakehouse&amp;gt;"
workspace_id_dst = "&amp;lt;dest_ws&amp;gt;"
lakehouse_id_dst = "&amp;lt;dest_lakehouse&amp;gt;"

# 1) Get a bearer token scoped to Fabric API
token = mssparkutils.credentials.getToken("https://api.fabric.microsoft.com/")

# 2) List tables from source lakehouse
tables_url = f"https://api.fabric.microsoft.com/v1/workspaces/{workspace_id_src}/items/{lakehouse_id_src}/tables"
tables = []
next_url = tables_url
headers = {"Authorization": f"Bearer {token}", "Content-Type": "application/json"}
while next_url:
    r = requests.get(next_url, headers=headers)
    r.raise_for_status()
    data = r.json()
    tables.extend([t["name"] for t in data.get("value", [])])
    next_url = data.get("@odata.nextLink")

# 3) Create shortcuts in destination lakehouse under Tables/&amp;lt;name&amp;gt;
create_url = f"https://api.fabric.microsoft.com/v1/workspaces/{workspace_id_dst}/items/{lakehouse_id_dst}/shortcuts"
for name in tables:
    body = {
        "name": name,  # display name; Tables leaf drives table name in UI
        "path": f"Tables/{name}",
        "target": {
            "oneLake": {
                "workspaceId": workspace_id_src,
                "itemId": lakehouse_id_src,
                "path": f"Tables/{name}",
                "itemType": "Lakehouse"
            }
        }
    }
    resp = requests.post(create_url, headers=headers, json=body)
    if resp.status_code not in (200, 201):
        print(f"Failed for {name}: {resp.status_code} {resp.text}")&lt;/LI-CODE&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;If you found this helpful, consider giving some Kudos. If I answered your question or solved your problem, mark this post as the solution.&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Sep 2025 04:27:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Automate-creating-shortcusts/m-p/4835931#M12527</guid>
      <dc:creator>tayloramy</dc:creator>
      <dc:date>2025-09-26T04:27:57Z</dc:date>
    </item>
    <item>
      <title>Re: Automate creating shortcusts</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Automate-creating-shortcusts/m-p/4837769#M12578</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="79747" data-lia-user-login="AstridM" class="lia-mention lia-mention-user"&gt;AstridM&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks for reaching out to the Microsoft fabric community forum.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Could you please let us know if the issue has been resolved?&amp;nbsp;I wanted to check if you had the opportunity to review the information provided by &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1340679" data-lia-user-login="tayloramy" class="lia-mention lia-mention-user"&gt;tayloramy&lt;/a&gt;&amp;nbsp;. If you still require support, please let us know, we are happy to assist you.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank you&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Sep 2025 10:52:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Automate-creating-shortcusts/m-p/4837769#M12578</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-09-29T10:52:05Z</dc:date>
    </item>
    <item>
      <title>Re: Automate creating shortcusts</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Automate-creating-shortcusts/m-p/4837926#M12585</link>
      <description>&lt;P&gt;Good morning, thanks, but it is not working, I tried this before, I get&amp;nbsp;HTTPError: 404 Client Error: Not Found for url:&amp;nbsp;api.fabric.microsoft.com/v1/workspaces/workspace_id/items/lakehouse_id/tables,&amp;nbsp;from what I google it said because of the schema enable lakehouse, but I am not sure if it is that, or it is because it is a lakehouse created by the system with export to synapse link to the one lake in fabric.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Sep 2025 12:57:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Automate-creating-shortcusts/m-p/4837926#M12585</guid>
      <dc:creator>AstridM</dc:creator>
      <dc:date>2025-09-29T12:57:48Z</dc:date>
    </item>
    <item>
      <title>Re: Automate creating shortcusts</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Automate-creating-shortcusts/m-p/4840556#M12677</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="79747" data-lia-user-login="AstridM" class="lia-mention lia-mention-user"&gt;AstridM&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The 404 Not Found error occurs because your lakehouse is schema-enabled, which is the case for those created automatically by Synapse Link as well.&lt;/P&gt;
&lt;P&gt;In schema-enabled lakehouses, tables are not available directly under the /tables endpoint, so the call fails. Instead, you should first use the GET /schemas API to list the available schemas in the lakehouse, and then call GET /schemas/{schemaName}/tables to retrieve the tables within each schema.&lt;/P&gt;
&lt;P&gt;Once you have the table names, you can loop through them and create the shortcuts using the OneLake Shortcuts API, setting the path to Tables/&amp;lt;tableName&amp;gt; in your destination lakehouse. This approach works for both system-created and manually created schema-enabled lakehouses.&lt;/P&gt;
&lt;P&gt;For details, please refer to the documentation: &lt;A href="https://learn.microsoft.com/en-us/rest/api/fabric/core/onelake-shortcuts" target="_blank"&gt;OneLake Shortcuts - REST API (Core) | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Hope this helps. Please feel free to rech out for any further questions.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;Thank you .&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Oct 2025 10:07:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Automate-creating-shortcusts/m-p/4840556#M12677</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-10-02T10:07:59Z</dc:date>
    </item>
    <item>
      <title>Re: Automate creating shortcusts</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Automate-creating-shortcusts/m-p/4842502#M12721</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="79747" data-lia-user-login="AstridM" class="lia-mention lia-mention-user"&gt;AstridM&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I wanted to follow up on our previous suggestions. We would like to hear back from you to ensure we can assist you further.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 05 Oct 2025 14:53:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Automate-creating-shortcusts/m-p/4842502#M12721</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-10-05T14:53:35Z</dc:date>
    </item>
    <item>
      <title>Re: Automate creating shortcusts</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Automate-creating-shortcusts/m-p/4845370#M12782</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="79747" data-lia-user-login="AstridM" class="lia-mention lia-mention-user"&gt;AstridM&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-teams="true"&gt;We haven’t received an update from you in some time. Could you please let us know if the issue has been resolved?&lt;BR /&gt;If you still require support, please let us know, we are happy to assist you.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Oct 2025 10:03:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Automate-creating-shortcusts/m-p/4845370#M12782</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-10-08T10:03:56Z</dc:date>
    </item>
  </channel>
</rss>

