Dataset
Dataset resource type. Azure REST API version: 2018-06-01. Prior API version in Azure Native 1.x: 2018-06-01.
Example Usage
Datasets_Create
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var dataset = new AzureNative.DataFactory.Dataset("dataset", new()
{
DatasetName = "exampleDataset",
FactoryName = "exampleFactoryName",
Properties = new AzureNative.DataFactory.Inputs.AzureBlobDatasetArgs
{
FileName =
{
{ "type", "Expression" },
{ "value", "@dataset().MyFileName" },
},
FolderPath =
{
{ "type", "Expression" },
{ "value", "@dataset().MyFolderPath" },
},
Format = new AzureNative.DataFactory.Inputs.TextFormatArgs
{
Type = "TextFormat",
},
LinkedServiceName = new AzureNative.DataFactory.Inputs.LinkedServiceReferenceArgs
{
ReferenceName = "exampleLinkedService",
Type = AzureNative.DataFactory.Type.LinkedServiceReference,
},
Parameters =
{
{ "MyFileName", new AzureNative.DataFactory.Inputs.ParameterSpecificationArgs
{
Type = AzureNative.DataFactory.ParameterType.String,
} },
{ "MyFolderPath", new AzureNative.DataFactory.Inputs.ParameterSpecificationArgs
{
Type = AzureNative.DataFactory.ParameterType.String,
} },
},
Type = "AzureBlob",
},
ResourceGroupName = "exampleResourceGroup",
});
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-azure-native-sdk/datafactory/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := datafactory.NewDataset(ctx, "dataset", &datafactory.DatasetArgs{
DatasetName: pulumi.String("exampleDataset"),
FactoryName: pulumi.String("exampleFactoryName"),
Properties: datafactory.AzureBlobDataset{
FileName: map[string]interface{}{
"type": "Expression",
"value": "@dataset().MyFileName",
},
FolderPath: map[string]interface{}{
"type": "Expression",
"value": "@dataset().MyFolderPath",
},
Format: datafactory.TextFormat{
Type: "TextFormat",
},
LinkedServiceName: datafactory.LinkedServiceReference{
ReferenceName: "exampleLinkedService",
Type: datafactory.TypeLinkedServiceReference,
},
Parameters: interface{}{
MyFileName: datafactory.ParameterSpecification{
Type: datafactory.ParameterTypeString,
},
MyFolderPath: datafactory.ParameterSpecification{
Type: datafactory.ParameterTypeString,
},
},
Type: "AzureBlob",
},
ResourceGroupName: pulumi.String("exampleResourceGroup"),
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.datafactory.Dataset;
import com.pulumi.azurenative.datafactory.DatasetArgs;
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 dataset = new Dataset("dataset", DatasetArgs.builder()
.datasetName("exampleDataset")
.factoryName("exampleFactoryName")
.properties(AzureBlobDatasetArgs.builder()
.fileName(Map.ofEntries(
Map.entry("type", "Expression"),
Map.entry("value", "@dataset().MyFileName")
))
.folderPath(Map.ofEntries(
Map.entry("type", "Expression"),
Map.entry("value", "@dataset().MyFolderPath")
))
.format(TextFormatArgs.builder()
.type("TextFormat")
.build())
.linkedServiceName(LinkedServiceReferenceArgs.builder()
.referenceName("exampleLinkedService")
.type("LinkedServiceReference")
.build())
.parameters(Map.ofEntries(
Map.entry("MyFileName", Map.of("type", "String")),
Map.entry("MyFolderPath", Map.of("type", "String"))
))
.type("AzureBlob")
.build())
.resourceGroupName("exampleResourceGroup")
.build());
}
}
Content copied to clipboard
Datasets_Update
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var dataset = new AzureNative.DataFactory.Dataset("dataset", new()
{
DatasetName = "exampleDataset",
FactoryName = "exampleFactoryName",
Properties = new AzureNative.DataFactory.Inputs.AzureBlobDatasetArgs
{
Description = "Example description",
FileName =
{
{ "type", "Expression" },
{ "value", "@dataset().MyFileName" },
},
FolderPath =
{
{ "type", "Expression" },
{ "value", "@dataset().MyFolderPath" },
},
Format = new AzureNative.DataFactory.Inputs.TextFormatArgs
{
Type = "TextFormat",
},
LinkedServiceName = new AzureNative.DataFactory.Inputs.LinkedServiceReferenceArgs
{
ReferenceName = "exampleLinkedService",
Type = AzureNative.DataFactory.Type.LinkedServiceReference,
},
Parameters =
{
{ "MyFileName", new AzureNative.DataFactory.Inputs.ParameterSpecificationArgs
{
Type = AzureNative.DataFactory.ParameterType.String,
} },
{ "MyFolderPath", new AzureNative.DataFactory.Inputs.ParameterSpecificationArgs
{
Type = AzureNative.DataFactory.ParameterType.String,
} },
},
Type = "AzureBlob",
},
ResourceGroupName = "exampleResourceGroup",
});
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-azure-native-sdk/datafactory/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := datafactory.NewDataset(ctx, "dataset", &datafactory.DatasetArgs{
DatasetName: pulumi.String("exampleDataset"),
FactoryName: pulumi.String("exampleFactoryName"),
Properties: datafactory.AzureBlobDataset{
Description: "Example description",
FileName: map[string]interface{}{
"type": "Expression",
"value": "@dataset().MyFileName",
},
FolderPath: map[string]interface{}{
"type": "Expression",
"value": "@dataset().MyFolderPath",
},
Format: datafactory.TextFormat{
Type: "TextFormat",
},
LinkedServiceName: datafactory.LinkedServiceReference{
ReferenceName: "exampleLinkedService",
Type: datafactory.TypeLinkedServiceReference,
},
Parameters: interface{}{
MyFileName: datafactory.ParameterSpecification{
Type: datafactory.ParameterTypeString,
},
MyFolderPath: datafactory.ParameterSpecification{
Type: datafactory.ParameterTypeString,
},
},
Type: "AzureBlob",
},
ResourceGroupName: pulumi.String("exampleResourceGroup"),
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.datafactory.Dataset;
import com.pulumi.azurenative.datafactory.DatasetArgs;
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 dataset = new Dataset("dataset", DatasetArgs.builder()
.datasetName("exampleDataset")
.factoryName("exampleFactoryName")
.properties(AzureBlobDatasetArgs.builder()
.description("Example description")
.fileName(Map.ofEntries(
Map.entry("type", "Expression"),
Map.entry("value", "@dataset().MyFileName")
))
.folderPath(Map.ofEntries(
Map.entry("type", "Expression"),
Map.entry("value", "@dataset().MyFolderPath")
))
.format(TextFormatArgs.builder()
.type("TextFormat")
.build())
.linkedServiceName(LinkedServiceReferenceArgs.builder()
.referenceName("exampleLinkedService")
.type("LinkedServiceReference")
.build())
.parameters(Map.ofEntries(
Map.entry("MyFileName", Map.of("type", "String")),
Map.entry("MyFolderPath", Map.of("type", "String"))
))
.type("AzureBlob")
.build())
.resourceGroupName("exampleResourceGroup")
.build());
}
}
Content copied to clipboard
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:datafactory:Dataset exampleDataset /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/datasets/{datasetName}
Content copied to clipboard