Forum Discussion
Error Data Warehouse/Lakehouse
- 1 year ago
Hi HarderT ,
You can utilise Semantic Link Labs to repoint to new lakehouse.
import sempy.fabric as fabricfrom sempy_labs.directlake._get_shared_expression import get_shared_expressionfrom sempy_labs._helper_functions import (resolve_lakehouse_name,)from sempy_labs.tom import connect_semantic_modelfrom typing import Optionalimport sempy_labs._icons as iconsdef update_direct_lake_model_lakehouse_connection(dataset: str,workspace: Optional[str] = None,lakehouse: Optional[str] = None,lakehouse_workspace: Optional[str] = None,😞"""Remaps a Direct Lake semantic model's SQL Endpoint connection to a new lakehouse.Parameters----------dataset : strName of the semantic model.workspace : str, default=NoneThe Fabric workspace name in which the semantic model exists.Defaults to None which resolves to the workspace of the attached lakehouseor if no lakehouse attached, resolves to the workspace of the notebook.lakehouse : str, default=NoneThe Fabric lakehouse used by the Direct Lake semantic model.Defaults to None which resolves to the lakehouse attached to the notebook.lakehouse_workspace : str, default=NoneThe Fabric workspace used by the lakehouse.Defaults to None which resolves to the workspace of the attached lakehouseor if no lakehouse attached, resolves to the workspace of the notebook.Returns-------"""workspace = fabric.resolve_workspace_name(workspace)if lakehouse_workspace is None:lakehouse_workspace = workspaceif lakehouse is None:lakehouse_id = fabric.get_lakehouse_id()lakehouse = resolve_lakehouse_name(lakehouse_id, lakehouse_workspace)# Check if lakehouse is validdfI = fabric.list_items(workspace=lakehouse_workspace, type="Lakehouse")dfI_filt = dfI[(dfI["Display Name"] == lakehouse)]if len(dfI_filt) == 0:raise ValueError(f"{icons.red_dot} The '{lakehouse}' lakehouse does not exist within the '{lakehouse_workspace}' workspace. "f"Therefore it cannot be used to support the '{dataset}' semantic model within the '{workspace}' workspace.")dfP = fabric.list_partitions(dataset=dataset, workspace=workspace)dfP_filt = dfP[dfP["Mode"] == "DirectLake"]if len(dfP_filt) == 0:raise ValueError(f"{icons.red_dot} The '{dataset}' semantic model is not in Direct Lake. This function is only applicable to Direct Lake semantic models.")else:with connect_semantic_model(dataset=dataset, readonly=False, workspace=workspace) as tom:shEx = get_shared_expression(lakehouse, lakehouse_workspace)try:tom.model.Expressions["DatabaseQuery"].Expression = shExprint(f"{icons.green_dot} The expression in the '{dataset}' semantic model has been updated to point to the '{lakehouse}' lakehouse in the '{lakehouse_workspace}' workspace.")except Exception as e:raise ValueError(f"{icons.red_dot} The expression in the '{dataset}' semantic model was not updated.") from eTry the above code. Simalarly you can repoint the reportsRegards,SrisakthiIf this helps, please mark is Accept As Solution
Hi HarderT,
Thank you for reaching out to Microsoft Fabric Community Forum.
At this time, there is no option in Fabric to disable or re-enable the SQL endpoint manually, and the issue requires backend support from Microsoft to resolve.
As a temporary workaround, copy your tables to a new Lakehouse using a Spark notebook, which will reinitialize the SQL endpoint properly.
Since error 615 is a fatal metadata/page-level error and the SQL endpoint is broken even though data is visible in Lakehouse Explorer, it likely needs backend repair by the Microsoft Fabric team.
Please raise a support ticket with Microsoft, referencing the exact error message and timestamp.
https://learn.microsoft.com/en-us/power-bi/support/create-support-ticket
If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it!
Regards,
Vinay Pabbu
Hi HarderT,
As we haven't heard back from you, I hope you have raised a support ticket. At this time we are closing this thread. If you have any further issues, please start a new thread in the community forum, and we are here to assist you. Thankyou for your understanding and continuous support.
Thank you for being part of the Microsoft Fabric Community.
Regards,
Vinay Pabbu