FabricTools v0.33.0 Public Preview

New-FabricKQLDatabase

Creates a new KQLDatabase in a specified Microsoft Fabric workspace.

Syntax

New-FabricKQLDatabase [-WorkspaceId] <guid> [-KQLDatabaseName] <string>
 [[-KQLDatabaseDescription] <string>] [[-parentEventhouseId] <guid>] [-KQLDatabaseType] <string>
 [[-KQLInvitationToken] <string>] [[-KQLSourceClusterUri] <string>]
 [[-KQLSourceDatabaseName] <string>] [[-KQLDatabasePathDefinition] <string>]
 [[-KQLDatabasePathPlatformDefinition] <string>] [[-KQLDatabasePathSchemaDefinition] <string>]
 [-WhatIf] [-Confirm] [<CommonParameters>]

Description

This function sends a POST request to the Microsoft Fabric API to create a new KQLDatabase in the specified workspace. It supports optional parameters for KQLDatabase description and path definitions for the KQLDatabase content.

Examples

Example 1

Creates a new KQLDatabase named "New KQLDatabase" in the workspace with ID "workspace-12345".

New-FabricKQLDatabase -WorkspaceId "workspace-12345" -KQLDatabaseName "New KQLDatabase"

Parameters

NameTypeReq.Pos.PipelineDescription
-KQLDatabaseName string ✓Required 1 –

The name of the KQLDatabase to be created.

-KQLDatabaseType string ✓Required 4 –

The type of KQLDatabase to create. Valid values are "ReadWrite" and "Shortcut".

-WorkspaceId guid ✓Required 0 –

The unique identifier of the workspace where the KQLDatabase will be created.

-Confirmalias: cf switch Named –

Prompts you for confirmation before running the cmdlet.

-KQLDatabaseDescription string 2 –

An optional description for the KQLDatabase.

-KQLDatabasePathDefinition string 8 –

An optional path to the KQLDatabase definition file (e.g., .ipynb file) to upload.

-KQLDatabasePathPlatformDefinition string 9 –

An optional path to the platform-specific definition (e.g., .platform file) to upload.

-KQLDatabasePathSchemaDefinition string 10 –

the path to the KQLDatabase schema definition file (e.g., .kql file) to upload.

-KQLInvitationToken string 5 –

An optional invitation token for the KQLDatabase.

-KQLSourceClusterUri string 6 –

An optional source cluster URI for the KQLDatabase.

-KQLSourceDatabaseName string 7 –

An optional source database name for the KQLDatabase.

-parentEventhouseId guid 3 –

The ID of the parent Eventhouse item for the KQLDatabase. This is mandatory for ReadWrite type databases.

-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.
  • Precedent Request Body
  • Definition file high priority.
  • CreationPayload is evaluate only if Definition file is not provided.
  • invitationToken has priority over all other payload fields.

Author: Tiago Balabuch, Kamil Nowinski