Forum Discussion
Automate creating shortcusts
- Anonymous10 months ago
Hi AstridM ,
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.
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.
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/<tableName> in your destination lakehouse. This approach works for both system-created and manually created schema-enabled lakehouses.
For details, please refer to the documentation: OneLake Shortcuts - REST API (Core) | Microsoft Learn
Hope this helps. Please feel free to rech out for any further questions.
Thank you .
Hi AstridM ,
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.
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.
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/<tableName> in your destination lakehouse. This approach works for both system-created and manually created schema-enabled lakehouses.
For details, please refer to the documentation: OneLake Shortcuts - REST API (Core) | Microsoft Learn
Hope this helps. Please feel free to rech out for any further questions.
Thank you .
Hi AstridM ,
I wanted to follow up on our previous suggestions. We would like to hear back from you to ensure we can assist you further.
Thank you.