Skip to main content

easyfabric.fabric.rest_api

REST API utilities for interacting with Microsoft FabricAn all-in-one data and analytics platform from Microsoft. Think of it as a "digital warehouse" for all your company's information. APIs.

refresh_sql_endpoint_metadata​

def refresh_sql_endpoint_metadata(lakehouse_name: str = None,
layer: str = None,
workspace_id: str = None,
access_token: str = None,
config_manager: ConfigManager = None,
timeout_minutes: int = 15,
interactive_only: bool = False) -> dict

Refreshes the SQL Endpoint metadata for a given lakehouseA place where you store both "raw" data (like files) and "organized" data (like tables). It combines the best of a File Cabinet and a Database..

Arguments:

  • lakehouse_name str, optional - Name of the lakehouse (display name). Mutually exclusive with layer; exactly one must be provided.
  • layer str, optional - Layer name (e.g. "bronze", "meta"). Resolved to the configured lakehouse via config_manager.get_lakehouse_by_layer(layer). Mutually exclusive with lakehouse_name.
  • workspace_id str, optional - Workspace ID. If not provided, it will be retrieved from the notebook context (notebookutils).
  • access_token str, optional - Bearer token. If not provided, it will be retrieved using notebookutils or Service Principal from config_manager.
  • config_manager ConfigManager, optional - Configuration manager used to retrieve app credentials if access_token is not provided, and to resolve layer to a lakehouse name if layer is given. Auto-initialized when needed.
  • timeout_minutes int, optional - Timeout for the refresh in minutes. Defaults to 15.
  • interactive_only bool, optional - If True, only runs the refresh if the notebook is running in interactive mode. Defaults to False.

Returns:

  • dict - The API response from the refresh request, or a skip message.

Raises:

  • ValueError - If neither or both of lakehouse_name/layer are provided, or if workspace_id, access_token or credentials cannot be determined.
  • requests.exceptions.HTTPError - If the API request fails.