Items - Create KQL Database
Creates a KQL database in the specified workspace.
This API supports long running operations (LRO).
Permissions
The caller must have a contributor workspace role.
Required Delegated Scopes
KQLDatabase.ReadWrite.All or Item.ReadWrite.All
Limitations
- To create a KQL database the workspace must be on a supported Fabric capacity. For more information see: Microsoft Fabric license types.
Microsoft Entra supported identities
This API supports the Microsoft identities listed in this section.
| Identity | Support |
|---|---|
| User | Yes |
| Service principal and Managed identities | Yes |
Interface
POST https://api.fabric.microsoft.com/v1/workspaces/{workspaceId}/kqlDatabases
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
workspace
|
path | True |
string (uuid) |
The workspace ID. |
Request Body
| Name | Required | Type | Description |
|---|---|---|---|
| displayName | True |
string |
The KQL database display name. The database name can contain alphanumeric characters, underscores, periods, and hyphens. Special characters aren't supported. |
| creationPayload | KQLDatabaseCreationPayload: |
The KQL database creation payload. Use |
|
| definition |
The KQL database public definition. Use |
||
| description |
string |
The KQL database description. Maximum length is 256 characters. |
|
| folderId |
string (uuid) |
The folder ID. If not specified or null, the KQL database is created with the workspace as its folder. |
Responses
| Name | Type | Description |
|---|---|---|
| 201 Created |
Successfully created |
|
| 202 Accepted |
Request accepted, KQL database provisioning in progress Headers
|
|
| Other Status Codes |
Common error codes:
|
Examples
Create a ReadWrite KQL database example
Sample request
POST https://api.fabric.microsoft.com/v1/workspaces/cfafbeb1-8037-4d0c-896e-a46fb27ff229/kqlDatabases
{
"displayName": "KQLDatabase_1",
"description": "A KQL database description.",
"creationPayload": {
"databaseType": "ReadWrite",
"parentEventhouseItemId": "5b218778-e7a5-4d73-8187-f10824047836"
}
}
Sample response
Location: https://api.fabric.microsoft.com/v1/operations/0acd697c-1550-43cd-b998-91bfbfbd47c6
x-ms-operation-id: 0acd697c-1550-43cd-b998-91bfbfbd47c6
Retry-After: 30
Create a ReadWrite KQL database with definition example
Sample request
POST https://api.fabric.microsoft.com/v1/workspaces/cfafbeb1-8037-4d0c-896e-a46fb27ff229/kqlDatabases
{
"displayName": "KQLDatabase_1",
"description": "A KQL database description.",
"definition": {
"parts": [
{
"path": "DatabaseProperties.json",
"payload": "ewogICJkYXRhYmFzZVR5cGUiOiAiUmVhZFdyaXRlIiwKICAicGFyZW50RXZlbnRob3VzZUl0ZW1JZCI6ICI1YjIxODc3OC1lN2E1LTRkNzMtODE4Ny1mMTA4MjQwNDc4MzYiLAogICJvbmVMYWtlQ2FjaGluZ1BlcmlvZCI6ICJQMzY1MDBEIiwKICAib25lTGFrZVN0YW5kYXJkU3RvcmFnZVBlcmlvZCI6ICJQMzY1MDBEIgp9",
"payloadType": "InlineBase64"
},
{
"path": "DatabaseSchema.kql",
"payload": "Ly8gS1FMIHNjcmlwdAovLyBVc2UgbWFuYWdlbWVudCBjb21tYW5kcyBpbiB0aGlzIHNjcmlwdCB0byBjb25maWd1cmUgeW91ciBkYXRhYmFzZSBpdGVtcywgc3VjaCBhcyB0YWJsZXMsIGZ1bmN0aW9ucywgbWF0ZXJpYWxpemVkIHZpZXdzLCBhbmQgbW9yZS4KCi5jcmVhdGUtbWVyZ2UgdGFibGUgTXlMb2dzIChMZXZlbDpzdHJpbmcsIFRpbWVzdGFtcDpkYXRldGltZSwgVXNlcklkOnN0cmluZywgVHJhY2VJZDpzdHJpbmcsIE1lc3NhZ2U6c3RyaW5nLCBQcm9jZXNzSWQ6aW50KQ==",
"payloadType": "InlineBase64"
},
{
"path": ".platform",
"payload": "ZG90UGxhdGZvcm1CYXNlNjRTdHJpbmc=",
"payloadType": "InlineBase64"
}
]
}
}
Sample response
{
"displayName": "KQLDatabase_1",
"description": "A KQL database description.",
"type": "KQLDatabase",
"workspaceId": "cfafbeb1-8037-4d0c-896e-a46fb27ff229",
"id": "5b218778-e7a5-4d73-8187-f10824047651"
}
Location: https://api.fabric.microsoft.com/v1/operations/0acd697c-1550-43cd-b998-91bfbfbd47c6
x-ms-operation-id: 0acd697c-1550-43cd-b998-91bfbfbd47c6
Retry-After: 30
Create a Shortcut KQL database to source Azure Data Explorer cluster example
Sample request
POST https://api.fabric.microsoft.com/v1/workspaces/cfafbeb1-8037-4d0c-896e-a46fb27ff229/kqlDatabases
{
"displayName": "KQLDatabase_1",
"description": "A KQL database description.",
"creationPayload": {
"databaseType": "Shortcut",
"parentEventhouseItemId": "5b218778-e7a5-4d73-8187-f10824047836",
"sourceClusterUri": "https://adxcluster.westus.kusto.windows.net",
"sourceDatabaseName": "MyDatabase"
}
}
Sample response
{
"displayName": "KQLDatabase_1",
"description": "A KQL database description.",
"type": "KQLDatabase",
"workspaceId": "cfafbeb1-8037-4d0c-896e-a46fb27ff229",
"id": "5b218778-e7a5-4d73-8187-f10824047653"
}
Location: https://api.fabric.microsoft.com/v1/operations/0acd697c-1550-43cd-b998-91bfbfbd47c6
x-ms-operation-id: 0acd697c-1550-43cd-b998-91bfbfbd47c6
Retry-After: 30
Create a Shortcut KQL database to source Azure Data Explorer cluster with invitation token example
Sample request
POST https://api.fabric.microsoft.com/v1/workspaces/cfafbeb1-8037-4d0c-896e-a46fb27ff229/kqlDatabases
{
"displayName": "KQLDatabase_1",
"description": "A KQL database description.",
"creationPayload": {
"databaseType": "Shortcut",
"parentEventhouseItemId": "5b218778-e7a5-4d73-8187-f10824047836",
"invitationToken": "eyJ0eXAiOiJKVInvitationToken"
}
}
Sample response
{
"displayName": "KQLDatabase_1",
"description": "A KQL database description.",
"type": "KQLDatabase",
"workspaceId": "cfafbeb1-8037-4d0c-896e-a46fb27ff229",
"id": "5b218778-e7a5-4d73-8187-f10824047654"
}
Location: https://api.fabric.microsoft.com/v1/operations/0acd697c-1550-43cd-b998-91bfbfbd47c6
x-ms-operation-id: 0acd697c-1550-43cd-b998-91bfbfbd47c6
Retry-After: 30
Create a Shortcut KQL database to source KQL database example
Sample request
POST https://api.fabric.microsoft.com/v1/workspaces/cfafbeb1-8037-4d0c-896e-a46fb27ff229/kqlDatabases
{
"displayName": "KQLDatabase_1",
"description": "A KQL database description.",
"creationPayload": {
"databaseType": "Shortcut",
"parentEventhouseItemId": "5b218778-e7a5-4d73-8187-f10824047836",
"sourceDatabaseName": "ac542109-abd1-4ee3-aec5-86282c01ee24"
}
}
Sample response
{
"displayName": "KQLDatabase_1",
"description": "A KQL database description.",
"type": "KQLDatabase",
"workspaceId": "cfafbeb1-8037-4d0c-896e-a46fb27ff229",
"id": "5b218778-e7a5-4d73-8187-f10824047652"
}
Location: https://api.fabric.microsoft.com/v1/operations/0acd697c-1550-43cd-b998-91bfbfbd47c6
x-ms-operation-id: 0acd697c-1550-43cd-b998-91bfbfbd47c6
Retry-After: 30
Definitions
| Name | Description |
|---|---|
|
Create |
Create KQL database request payload. |
|
Error |
The error related resource details object. |
|
Error |
The error response. |
|
Error |
The error response details. |
|
Item |
Represents a tag applied on an item. |
|
Item |
The type of the item. Additional item types may be added over time. |
| KQLDatabase |
A KQL database object. |
|
KQLDatabase |
KQL database public definition object. |
|
KQLDatabase |
KQL database definition part object. |
|
KQLDatabase |
The KQL database properties. |
|
Kql |
The type of the database. |
|
Payload |
The type of the definition part payload. Additional payload types may be added over time. |
|
Read |
ReadWrite KQL database item creation payload |
|
Shortcut |
Shortcut KQL database item creation payload |
CreateKQLDatabaseRequest
Create KQL database request payload.
| Name | Type | Description |
|---|---|---|
| creationPayload | KQLDatabaseCreationPayload: |
The KQL database creation payload. Use |
| definition |
The KQL database public definition. Use |
|
| description |
string |
The KQL database description. Maximum length is 256 characters. |
| displayName |
string |
The KQL database display name. The database name can contain alphanumeric characters, underscores, periods, and hyphens. Special characters aren't supported. |
| folderId |
string (uuid) |
The folder ID. If not specified or null, the KQL database is created with the workspace as its folder. |
ErrorRelatedResource
The error related resource details object.
| Name | Type | Description |
|---|---|---|
| resourceId |
string |
The resource ID that's involved in the error. |
| resourceType |
string |
The type of the resource that's involved in the error. |
ErrorResponse
The error response.
| Name | Type | Description |
|---|---|---|
| errorCode |
string |
A specific identifier that provides information about an error condition, allowing for standardized communication between our service and its users. |
| message |
string |
A human readable representation of the error. |
| moreDetails |
List of additional error details. |
|
| relatedResource |
The error related resource details. |
|
| requestId |
string |
ID of the request associated with the error. |
ErrorResponseDetails
The error response details.
| Name | Type | Description |
|---|---|---|
| errorCode |
string |
A specific identifier that provides information about an error condition, allowing for standardized communication between our service and its users. |
| message |
string |
A human readable representation of the error. |
| relatedResource |
The error related resource details. |
ItemTag
Represents a tag applied on an item.
| Name | Type | Description |
|---|---|---|
| displayName |
string |
The name of the tag. |
| id |
string (uuid) |
The tag ID. |
ItemType
The type of the item. Additional item types may be added over time.
| Value | Description |
|---|---|
| Dashboard |
PowerBI dashboard. |
| Report |
PowerBI report. |
| SemanticModel |
PowerBI semantic model. |
| PaginatedReport |
PowerBI paginated report. |
| Datamart |
PowerBI datamart. |
| Lakehouse |
A lakehouse. |
| Eventhouse |
An eventhouse. |
| Environment |
An environment. |
| KQLDatabase |
A KQL database. |
| KQLQueryset |
A KQL queryset. |
| KQLDashboard |
A KQL dashboard. |
| DataPipeline |
A data pipeline. |
| Notebook |
A notebook. |
| SparkJobDefinition |
A spark job definition. |
| MLExperiment |
A machine learning experiment. |
| MLModel |
A machine learning model. |
| Warehouse |
A warehouse. |
| Eventstream |
An eventstream. |
| SQLEndpoint |
An SQL endpoint. |
| MirroredWarehouse |
A mirrored warehouse. |
| MirroredDatabase |
A mirrored database. |
| Reflex |
A Reflex. |
| GraphQLApi |
An API for GraphQL item. |
| MountedDataFactory |
A MountedDataFactory. |
| SQLDatabase |
A SQLDatabase. |
| CopyJob |
A Copy job. |
| VariableLibrary |
A VariableLibrary. |
| Dataflow |
A Dataflow. |
| ApacheAirflowJob |
An ApacheAirflowJob. |
| WarehouseSnapshot |
A Warehouse snapshot. |
| DigitalTwinBuilder |
A DigitalTwinBuilder. |
| DigitalTwinBuilderFlow |
A Digital Twin Builder Flow. |
| MirroredAzureDatabricksCatalog |
A mirrored azure databricks catalog. |
| Map |
A Map. |
| AnomalyDetector |
An Anomaly Detector. |
| UserDataFunction |
A User Data Function. |
KQLDatabase
A KQL database object.
| Name | Type | Description |
|---|---|---|
| description |
string |
The item description. |
| displayName |
string |
The item display name. |
| folderId |
string (uuid) |
The folder ID. |
| id |
string (uuid) |
The item ID. |
| properties |
The KQL database properties. |
|
| tags |
Item |
List of applied tags. |
| type |
The item type. |
|
| workspaceId |
string (uuid) |
The workspace ID. |
KQLDatabaseDefinition
KQL database public definition object.
| Name | Type | Description |
|---|---|---|
| format |
string |
The format of the item definition. |
| parts |
A list of definition parts. |
KQLDatabaseDefinitionPart
KQL database definition part object.
| Name | Type | Description |
|---|---|---|
| path |
string |
The KQL database part path. |
| payload |
string |
The KQL database part payload. |
| payloadType |
The payload type. |
KQLDatabaseProperties
The KQL database properties.
| Name | Type | Description |
|---|---|---|
| databaseType |
The type of the database. |
|
| ingestionServiceUri |
string |
Ingestion service URI. |
| parentEventhouseItemId |
string |
Parent eventhouse ID. |
| queryServiceUri |
string |
Query service URI. |
KqlDatabaseType
The type of the database.
| Value | Description |
|---|---|
| ReadWrite |
Allows read and write operations on the database. |
| Shortcut |
A shortcut is an embedded reference allowing read only operations on a source database. The source can be in the same or different tenants, either in an Azure Data Explorer cluster or a Fabric Eventhouse. |
PayloadType
The type of the definition part payload. Additional payload types may be added over time.
| Value | Description |
|---|---|
| InlineBase64 |
Inline Base 64. |
ReadWriteDatabaseCreationPayload
ReadWrite KQL database item creation payload
| Name | Type | Description |
|---|---|---|
| databaseType |
string:
Read |
The type of the KQL database |
| parentEventhouseItemId |
string (uuid) |
Parent eventhouse item ID. |
ShortcutDatabaseCreationPayload
Shortcut KQL database item creation payload
| Name | Type | Description |
|---|---|---|
| databaseType |
string:
Shortcut |
The type of the KQL database |
| invitationToken |
string |
Invitation token to follow the source database |
| parentEventhouseItemId |
string (uuid) |
Parent eventhouse item ID. |
| sourceClusterUri |
string |
The URI of the source Eventhouse or Azure Data Explorer cluster |
| sourceDatabaseName |
string |
The name of the database to follow in the source Eventhouse or Azure Data Explorer cluster. |