Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hello,
I created a shortcut on my onelake, then transfer my shorcut to another schema via the alter schema transfer command
Then i wanted to delete the table (i am admin)->
Thank you
Hi @lesommf ,
You can try to drop it by sparksql commands from notebook or you can try %fs rm -r tablepath
Hi @Anonymous ,
Thank you for all your detailed answers, I will try to test that 🙂
Best regards
lesommf
Hi,@lesommf
Regarding the issue you raised, my solution is as follows:
1.Regarding your first question, the reason why you can't delete the table after the migration, I think it might be related to the fact that you are using ALTER SCHEMA, because in the official documentation, what it mentions is that when you move a security object into the new schema using ALTER SCHEMA, all the permissions associated with that security object are removed. If the owner of the security object has been explicitly set, the owner remains unchanged.
The following is the relevant documentation:
ALTER SCHEMA (Transact-SQL) - SQL Server | Microsoft Learn
Of course this may also have something to do with the DROP ENDPOINT you are using, with DROP ENDPOINT the user must be a member of the sysadmin Fixed Server Role, the owner of the endpoint, or must have been granted CONTROL access to the endpoint, and must not be able to execute the ENDPOINT DDL statement in a user transaction.
The following is the relevant documentation:
DROP ENDPOINT (Transact-SQL) - SQL Server | Microsoft Learn
Delete Tables (Database Engine) - SQL Server | Microsoft Learn
2.Regarding your second question "Why my table is working after the deletion of the shorcut.", my explanation is as follows:
The official documentation explains that shortcuts do not perform cascading deletions. When you delete a shortcut, only the shortcut object is deleted. The data in the shortcut target remains unchanged. However, if you perform a delete operation on a file or folder in the shortcut and you have permission to perform the delete operation in the shortcut target, the files and/or folders in the target will be deleted.
Here is the relevant documentation:
OneLake shortcuts - Microsoft Fabric | Microsoft Learn
Best Regards,
Leroy Lu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello @Anonymous,
I looked at the documentation and understood that when i moved the table, all the permissions associated with that object are removed.
So i added the rights in order to delete this table in the new schema (control rights). Of course i added all the rights that i can to test which could work by misunderstanding. But i can't still drop it.
I looked at the DROP ENDPOINT, but i can't understant what it's doing here.
Is it possible to give me the procedure to drop it ?
Thank you
Best regards,
lesommf
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 11 | |
| 10 | |
| 9 | |
| 8 | |
| 8 |