The azure-native:datashare:KustoTableDataSet resource, part of the Pulumi Azure Native provider, registers a Kusto table as a dataset within an Azure Data Share, defining what data recipients can access. This guide focuses on two capabilities: adding datasets to existing shares and configuring table-level inclusion and exclusion controls.
Datasets belong to shares within Data Share accounts and reference Kusto databases that must exist separately. The examples are intentionally small. Combine them with your own Data Share accounts, shares, and Kusto infrastructure.
Add a Kusto table dataset to a share
Data sharing workflows begin by adding datasets to an existing share, registering the Kusto table that recipients will access.
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const kustoTableDataSet = new azure_native.datashare.KustoTableDataSet("kustoTableDataSet", {
accountName: "Account1",
dataSetName: "Dataset1",
resourceGroupName: "SampleResourceGroup",
shareName: "Share1",
});
import pulumi
import pulumi_azure_native as azure_native
kusto_table_data_set = azure_native.datashare.KustoTableDataSet("kustoTableDataSet",
account_name="Account1",
data_set_name="Dataset1",
resource_group_name="SampleResourceGroup",
share_name="Share1")
package main
import (
datashare "github.com/pulumi/pulumi-azure-native-sdk/datashare/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := datashare.NewKustoTableDataSet(ctx, "kustoTableDataSet", &datashare.KustoTableDataSetArgs{
AccountName: pulumi.String("Account1"),
DataSetName: pulumi.String("Dataset1"),
ResourceGroupName: pulumi.String("SampleResourceGroup"),
ShareName: pulumi.String("Share1"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var kustoTableDataSet = new AzureNative.DataShare.KustoTableDataSet("kustoTableDataSet", new()
{
AccountName = "Account1",
DataSetName = "Dataset1",
ResourceGroupName = "SampleResourceGroup",
ShareName = "Share1",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.datashare.KustoTableDataSet;
import com.pulumi.azurenative.datashare.KustoTableDataSetArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var kustoTableDataSet = new KustoTableDataSet("kustoTableDataSet", KustoTableDataSetArgs.builder()
.accountName("Account1")
.dataSetName("Dataset1")
.resourceGroupName("SampleResourceGroup")
.shareName("Share1")
.build());
}
}
resources:
kustoTableDataSet:
type: azure-native:datashare:KustoTableDataSet
properties:
accountName: Account1
dataSetName: Dataset1
resourceGroupName: SampleResourceGroup
shareName: Share1
The accountName and shareName identify where the dataset lives within your Data Share hierarchy. The dataSetName provides a unique identifier for this dataset within the share. The resourceGroupName specifies the Azure resource group containing the Data Share account. This minimal configuration registers the dataset without specifying which Kusto database or tables to share.
Control table-level sharing with inclusion and exclusion lists
When sharing a Kusto database, you need granular control over which tables, external tables, and materialized views are included.
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const kustoTableDataSet = new azure_native.datashare.KustoTableDataSet("kustoTableDataSet", {
accountName: "Account1",
dataSetName: "Dataset1",
kind: "KustoTable",
kustoDatabaseResourceId: "/subscriptions/433a8dfd-e5d5-4e77-ad86-90acdc75eb1a/resourceGroups/SampleResourceGroup/providers/Microsoft.Kusto/clusters/Cluster1/databases/Database1",
resourceGroupName: "SampleResourceGroup",
shareName: "Share1",
tableLevelSharingProperties: {
externalTablesToExclude: [
"test11",
"test12",
],
externalTablesToInclude: [
"test9",
"test10",
],
materializedViewsToExclude: [
"test7",
"test8",
],
materializedViewsToInclude: [
"test5",
"test6",
],
tablesToExclude: [
"test3",
"test4",
],
tablesToInclude: [
"test1",
"test2",
],
},
});
import pulumi
import pulumi_azure_native as azure_native
kusto_table_data_set = azure_native.datashare.KustoTableDataSet("kustoTableDataSet",
account_name="Account1",
data_set_name="Dataset1",
kind="KustoTable",
kusto_database_resource_id="/subscriptions/433a8dfd-e5d5-4e77-ad86-90acdc75eb1a/resourceGroups/SampleResourceGroup/providers/Microsoft.Kusto/clusters/Cluster1/databases/Database1",
resource_group_name="SampleResourceGroup",
share_name="Share1",
table_level_sharing_properties={
"external_tables_to_exclude": [
"test11",
"test12",
],
"external_tables_to_include": [
"test9",
"test10",
],
"materialized_views_to_exclude": [
"test7",
"test8",
],
"materialized_views_to_include": [
"test5",
"test6",
],
"tables_to_exclude": [
"test3",
"test4",
],
"tables_to_include": [
"test1",
"test2",
],
})
package main
import (
datashare "github.com/pulumi/pulumi-azure-native-sdk/datashare/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := datashare.NewKustoTableDataSet(ctx, "kustoTableDataSet", &datashare.KustoTableDataSetArgs{
AccountName: pulumi.String("Account1"),
DataSetName: pulumi.String("Dataset1"),
Kind: pulumi.String("KustoTable"),
KustoDatabaseResourceId: pulumi.String("/subscriptions/433a8dfd-e5d5-4e77-ad86-90acdc75eb1a/resourceGroups/SampleResourceGroup/providers/Microsoft.Kusto/clusters/Cluster1/databases/Database1"),
ResourceGroupName: pulumi.String("SampleResourceGroup"),
ShareName: pulumi.String("Share1"),
TableLevelSharingProperties: &datashare.TableLevelSharingPropertiesArgs{
ExternalTablesToExclude: pulumi.StringArray{
pulumi.String("test11"),
pulumi.String("test12"),
},
ExternalTablesToInclude: pulumi.StringArray{
pulumi.String("test9"),
pulumi.String("test10"),
},
MaterializedViewsToExclude: pulumi.StringArray{
pulumi.String("test7"),
pulumi.String("test8"),
},
MaterializedViewsToInclude: pulumi.StringArray{
pulumi.String("test5"),
pulumi.String("test6"),
},
TablesToExclude: pulumi.StringArray{
pulumi.String("test3"),
pulumi.String("test4"),
},
TablesToInclude: pulumi.StringArray{
pulumi.String("test1"),
pulumi.String("test2"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var kustoTableDataSet = new AzureNative.DataShare.KustoTableDataSet("kustoTableDataSet", new()
{
AccountName = "Account1",
DataSetName = "Dataset1",
Kind = "KustoTable",
KustoDatabaseResourceId = "/subscriptions/433a8dfd-e5d5-4e77-ad86-90acdc75eb1a/resourceGroups/SampleResourceGroup/providers/Microsoft.Kusto/clusters/Cluster1/databases/Database1",
ResourceGroupName = "SampleResourceGroup",
ShareName = "Share1",
TableLevelSharingProperties = new AzureNative.DataShare.Inputs.TableLevelSharingPropertiesArgs
{
ExternalTablesToExclude = new[]
{
"test11",
"test12",
},
ExternalTablesToInclude = new[]
{
"test9",
"test10",
},
MaterializedViewsToExclude = new[]
{
"test7",
"test8",
},
MaterializedViewsToInclude = new[]
{
"test5",
"test6",
},
TablesToExclude = new[]
{
"test3",
"test4",
},
TablesToInclude = new[]
{
"test1",
"test2",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.datashare.KustoTableDataSet;
import com.pulumi.azurenative.datashare.KustoTableDataSetArgs;
import com.pulumi.azurenative.datashare.inputs.TableLevelSharingPropertiesArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var kustoTableDataSet = new KustoTableDataSet("kustoTableDataSet", KustoTableDataSetArgs.builder()
.accountName("Account1")
.dataSetName("Dataset1")
.kind("KustoTable")
.kustoDatabaseResourceId("/subscriptions/433a8dfd-e5d5-4e77-ad86-90acdc75eb1a/resourceGroups/SampleResourceGroup/providers/Microsoft.Kusto/clusters/Cluster1/databases/Database1")
.resourceGroupName("SampleResourceGroup")
.shareName("Share1")
.tableLevelSharingProperties(TableLevelSharingPropertiesArgs.builder()
.externalTablesToExclude(
"test11",
"test12")
.externalTablesToInclude(
"test9",
"test10")
.materializedViewsToExclude(
"test7",
"test8")
.materializedViewsToInclude(
"test5",
"test6")
.tablesToExclude(
"test3",
"test4")
.tablesToInclude(
"test1",
"test2")
.build())
.build());
}
}
resources:
kustoTableDataSet:
type: azure-native:datashare:KustoTableDataSet
properties:
accountName: Account1
dataSetName: Dataset1
kind: KustoTable
kustoDatabaseResourceId: /subscriptions/433a8dfd-e5d5-4e77-ad86-90acdc75eb1a/resourceGroups/SampleResourceGroup/providers/Microsoft.Kusto/clusters/Cluster1/databases/Database1
resourceGroupName: SampleResourceGroup
shareName: Share1
tableLevelSharingProperties:
externalTablesToExclude:
- test11
- test12
externalTablesToInclude:
- test9
- test10
materializedViewsToExclude:
- test7
- test8
materializedViewsToInclude:
- test5
- test6
tablesToExclude:
- test3
- test4
tablesToInclude:
- test1
- test2
The kind property must be set to “KustoTable” for Kusto table datasets. The kustoDatabaseResourceId points to the specific Kusto database containing the tables you want to share. The tableLevelSharingProperties block defines inclusion and exclusion lists for regular tables, external tables, and materialized views. Tables in the include lists are shared; tables in the exclude lists are filtered out. This allows you to share specific tables from a database while keeping others private.
Beyond these examples
These snippets focus on specific dataset-level features: dataset registration within shares and table-level sharing controls. They’re intentionally minimal rather than full data sharing solutions.
The examples reference pre-existing infrastructure such as Data Share accounts and shares, and Kusto clusters and databases. They focus on configuring the dataset rather than provisioning the surrounding infrastructure.
To keep things focused, common dataset patterns are omitted, including:
- Dataset provisioning state monitoring
- Cross-subscription or cross-tenant sharing
- Dataset deletion and lifecycle management
- Integration with SQL databases or Synapse pools (shown in other example headings but not detailed)
These omissions are intentional: the goal is to illustrate how each dataset feature is wired, not provide drop-in data sharing modules. See the KustoTableDataSet resource reference for all available configuration options.
Let's configure Azure Data Share Kusto Table Datasets
Get started with Pulumi Cloud, then follow our quick setup guide to deploy this infrastructure.
Try Pulumi Cloud for FREEFrequently Asked Questions
Resource Configuration
kind (set to KustoTable), kustoDatabaseResourceId (the resource ID of your Kusto database), and tableLevelSharingProperties (controlling which tables to share).kind to KustoTable. This is the expected value for Kusto table datasets.kustoDatabaseResourceId with the full Azure resource ID, like /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}.Table-Level Sharing
Use tableLevelSharingProperties to control sharing with include and exclude lists:
tablesToInclude/tablesToExcludefor regular tablesexternalTablesToInclude/externalTablesToExcludefor external tablesmaterializedViewsToInclude/materializedViewsToExcludefor materialized views
Immutability & Lifecycle
accountName, dataSetName, resourceGroupName, and shareName. Changing any of these requires recreating the resource.