FabricTools v0.33.0 Public Preview

Update-FabricKQLDatabaseDefinition

Updates the definition of a KQLDatabase in a Microsoft Fabric workspace.

Syntax

Update-FabricKQLDatabaseDefinition [-WorkspaceId] <guid> [-KQLDatabaseId] <guid>
 [-KQLDatabasePathDefinition] <string> [[-KQLDatabasePathPlatformDefinition] <string>]
 [[-KQLDatabasePathSchemaDefinition] <string>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description

This function allows updating the content or metadata of a KQLDatabase in a Microsoft Fabric workspace. The KQLDatabase content can be provided as file paths, and metadata updates can optionally be enabled.

Examples

Example 1

Updates the content of the KQLDatabase with ID 67890 in the workspace 12345 using the specified KQLDatabase file.

Update-FabricKQLDatabaseDefinition -WorkspaceId "12345" -KQLDatabaseId "67890" -KQLDatabasePathDefinition "C:\KQLDatabases\KQLDatabase.ipynb"

Example 2

Updates both the content and metadata of the KQLDatabase with ID 67890 in the workspace 12345.

Update-FabricKQLDatabaseDefinition -WorkspaceId "12345" -KQLDatabaseId "67890" -KQLDatabasePathDefinition "C:\KQLDatabases\KQLDatabase.ipynb" -UpdateMetadata $true

Parameters

NameTypeReq.Pos.PipelineDescription
-KQLDatabaseId guid ✓Required 1 –

(Mandatory) The unique identifier of the KQLDatabase to be updated.

-KQLDatabasePathDefinition string ✓Required 2 –

(Mandatory) The file path to the KQLDatabase content definition file. The content will be encoded as Base64 and sent in the request.

-WorkspaceId guid ✓Required 0 –

(Mandatory) The unique identifier of the workspace where the KQLDatabase resides.

-Confirmalias: cf switch Named –

Prompts you for confirmation before running the cmdlet.

-KQLDatabasePathPlatformDefinition string 3 –

(Optional) The file path to the KQLDatabase's platform-specific definition file. The content will be encoded as Base64 and sent in the request.

-KQLDatabasePathSchemaDefinition string 4 –

(Optional) The file path to the KQLDatabase's schema definition file. The content will be encoded as Base64 and sent in the request.

-WhatIfalias: wi switch Named –

Runs the command in a mode that only reports what would happen without performing the actions.

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.
  • The KQLDatabase content is encoded as Base64 before being sent to the Fabric API.
  • This function handles asynchronous operations and retrieves operation results if required.

Author: Tiago Balabuch, Kamil Nowinski