FabricTools v0.33.0 Public Preview

Get-FabricKQLDatabaseDefinition

Retrieves the definition of a KQLDatabase from a specific workspace in Microsoft Fabric.

Syntax

Get-FabricKQLDatabaseDefinition [-WorkspaceId] <guid> [[-KQLDatabaseId] <guid>]
 [[-KQLDatabaseFormat] <string>] [<CommonParameters>]

Description

This function fetches the KQLDatabase's content or metadata from a workspace. It supports retrieving KQLDatabase definitions in the Jupyter KQLDatabase (ipynb) format. Handles both synchronous and asynchronous operations, with detailed logging and error handling.

Examples

Example 1

Retrieves the definition of the KQLDatabase with ID 67890 from the workspace with ID 12345 in the ipynb format.

Get-FabricKQLDatabaseDefinition -WorkspaceId "12345" -KQLDatabaseId "67890"

Example 2

Retrieves the definitions of all KQLDatabases in the workspace with ID 12345 in the ipynb format.

Get-FabricKQLDatabaseDefinition -WorkspaceId "12345"

Parameters

NameTypeReq.Pos.PipelineDescription
-WorkspaceId guid ✓Required 0 –

(Mandatory) The unique identifier of the workspace from which the KQLDatabase definition is to be retrieved.

-KQLDatabaseFormat string 2 –

Specifies the format of the KQLDatabase definition. Currently, only 'ipynb' is supported.

-KQLDatabaseId guid 1 –

(Optional)The unique identifier of the KQLDatabase whose definition needs to be retrieved.

This cmdlet also supports the common parameters, such as -Verbose and -ErrorAction. See about_CommonParameters.

Notes

  • Requires $FabricConfig global configuration, including BaseUrl and FabricHeaders.
  • Calls Confirm-TokenState to ensure token validity before making the API request.
  • Handles long-running operations asynchronously.

Author: Tiago Balabuch, Kamil Nowinski