Microsoft.DataFactory factories/dataflows

Bicep resource definition

The factories/dataflows resource type can be deployed with operations that target:

For a list of changed properties in each API version, see change log.

Usage Examples

Bicep Samples

A basic example of deploying Data Flow inside an Azure Data Factory.

param resourceName string = 'acctest0001'
param location string = 'westeurope'

resource factory 'Microsoft.DataFactory/factories@2018-06-01' = {
  name: resourceName
  location: location
  properties: {
    publicNetworkAccess: 'Enabled'
  }
}

resource linkedservice 'Microsoft.DataFactory/factories/linkedservices@2018-06-01' = {
  name: resourceName
  parent: factory
  properties: {
    description: ''
    type: 'AzureBlobStorage'
    typeProperties: {
      serviceEndpoint: storageAccount.properties.primaryEndpoints.blob
    }
  }
}

resource storageAccount 'Microsoft.Storage/storageAccounts@2021-09-01' = {
  name: resourceName
  location: location
  sku: {
    name: 'Standard_LRS'
  }
  kind: 'StorageV2'
  properties: {
    accessTier: 'Hot'
    allowBlobPublicAccess: true
    allowCrossTenantReplication: true
    allowSharedKeyAccess: true
    defaultToOAuthAuthentication: false
    encryption: {
      keySource: 'Microsoft.Storage'
      services: {
        queue: {
          keyType: 'Service'
        }
        table: {
          keyType: 'Service'
        }
      }
    }
    isHnsEnabled: false
    isNfsV3Enabled: false
    isSftpEnabled: false
    minimumTlsVersion: 'TLS1_2'
    networkAcls: {
      defaultAction: 'Allow'
    }
    publicNetworkAccess: 'Enabled'
    supportsHttpsTrafficOnly: true
  }
}

resource dataflow 'Microsoft.DataFactory/factories/dataflows@2018-06-01' = {
  name: resourceName
  parent: factory
  properties: {
    description: ''
    type: 'Flowlet'
    typeProperties: {
      script: '''source(
  allowSchemaDrift: true, 
  validateSchema: false, 
  limit: 100, 
  ignoreNoFilesFound: false, 
  documentForm: ''documentPerLine'') ~> source1 
source1 sink(
  allowSchemaDrift: true, 
  validateSchema: false, 
  skipDuplicateMapInputs: true, 
  skipDuplicateMapOutputs: true) ~> sink1
'''
      sinks: [
        {
          description: ''
          linkedService: {
            parameters: {}
            referenceName: linkedservice.name
            type: 'LinkedServiceReference'
          }
          name: 'sink1'
        }
      ]
      sources: [
        {
          description: ''
          linkedService: {
            parameters: {}
            referenceName: linkedservice.name
            type: 'LinkedServiceReference'
          }
          name: 'source1'
        }
      ]
    }
  }
}

Resource format

To create a Microsoft.DataFactory/factories/dataflows resource, add the following Bicep to your template.

resource symbolicname 'Microsoft.DataFactory/factories/dataflows@2018-06-01' = {
  parent: resourceSymbolicName
  name: 'string'
  properties: {
    annotations: [
      any(...)
    ]
    description: 'string'
    folder: {
      name: 'string'
    }
    type: 'string'
    // For remaining properties, see DataFlow objects
  }
}

DataFlow objects

Set the type property to specify the type of object.

For Flowlet, use:

{
  type: 'Flowlet'
  typeProperties: {
    script: 'string'
    scriptLines: [
      'string'
    ]
    sinks: [
      {
        dataset: {
          parameters: {
            {customized property}: any(...)
          }
          referenceName: 'string'
          type: 'string'
        }
        description: 'string'
        flowlet: {
          datasetParameters: any(...)
          parameters: {
            {customized property}: any(...)
          }
          referenceName: 'string'
          type: 'string'
        }
        linkedService: {
          parameters: {
            {customized property}: any(...)
          }
          referenceName: 'string'
          type: 'string'
        }
        name: 'string'
        rejectedDataLinkedService: {
          parameters: {
            {customized property}: any(...)
          }
          referenceName: 'string'
          type: 'string'
        }
        schemaLinkedService: {
          parameters: {
            {customized property}: any(...)
          }
          referenceName: 'string'
          type: 'string'
        }
      }
    ]
    sources: [
      {
        dataset: {
          parameters: {
            {customized property}: any(...)
          }
          referenceName: 'string'
          type: 'string'
        }
        description: 'string'
        flowlet: {
          datasetParameters: any(...)
          parameters: {
            {customized property}: any(...)
          }
          referenceName: 'string'
          type: 'string'
        }
        linkedService: {
          parameters: {
            {customized property}: any(...)
          }
          referenceName: 'string'
          type: 'string'
        }
        name: 'string'
        schemaLinkedService: {
          parameters: {
            {customized property}: any(...)
          }
          referenceName: 'string'
          type: 'string'
        }
      }
    ]
    transformations: [
      {
        dataset: {
          parameters: {
            {customized property}: any(...)
          }
          referenceName: 'string'
          type: 'string'
        }
        description: 'string'
        flowlet: {
          datasetParameters: any(...)
          parameters: {
            {customized property}: any(...)
          }
          referenceName: 'string'
          type: 'string'
        }
        linkedService: {
          parameters: {
            {customized property}: any(...)
          }
          referenceName: 'string'
          type: 'string'
        }
        name: 'string'
      }
    ]
  }
}

For MappingDataFlow, use:

{
  type: 'MappingDataFlow'
  typeProperties: {
    script: 'string'
    scriptLines: [
      'string'
    ]
    sinks: [
      {
        dataset: {
          parameters: {
            {customized property}: any(...)
          }
          referenceName: 'string'
          type: 'string'
        }
        description: 'string'
        flowlet: {
          datasetParameters: any(...)
          parameters: {
            {customized property}: any(...)
          }
          referenceName: 'string'
          type: 'string'
        }
        linkedService: {
          parameters: {
            {customized property}: any(...)
          }
          referenceName: 'string'
          type: 'string'
        }
        name: 'string'
        rejectedDataLinkedService: {
          parameters: {
            {customized property}: any(...)
          }
          referenceName: 'string'
          type: 'string'
        }
        schemaLinkedService: {
          parameters: {
            {customized property}: any(...)
          }
          referenceName: 'string'
          type: 'string'
        }
      }
    ]
    sources: [
      {
        dataset: {
          parameters: {
            {customized property}: any(...)
          }
          referenceName: 'string'
          type: 'string'
        }
        description: 'string'
        flowlet: {
          datasetParameters: any(...)
          parameters: {
            {customized property}: any(...)
          }
          referenceName: 'string'
          type: 'string'
        }
        linkedService: {
          parameters: {
            {customized property}: any(...)
          }
          referenceName: 'string'
          type: 'string'
        }
        name: 'string'
        schemaLinkedService: {
          parameters: {
            {customized property}: any(...)
          }
          referenceName: 'string'
          type: 'string'
        }
      }
    ]
    transformations: [
      {
        dataset: {
          parameters: {
            {customized property}: any(...)
          }
          referenceName: 'string'
          type: 'string'
        }
        description: 'string'
        flowlet: {
          datasetParameters: any(...)
          parameters: {
            {customized property}: any(...)
          }
          referenceName: 'string'
          type: 'string'
        }
        linkedService: {
          parameters: {
            {customized property}: any(...)
          }
          referenceName: 'string'
          type: 'string'
        }
        name: 'string'
      }
    ]
  }
}

For WranglingDataFlow, use:

{
  type: 'WranglingDataFlow'
  typeProperties: {
    documentLocale: 'string'
    script: 'string'
    sources: [
      {
        dataset: {
          parameters: {
            {customized property}: any(...)
          }
          referenceName: 'string'
          type: 'string'
        }
        description: 'string'
        flowlet: {
          datasetParameters: any(...)
          parameters: {
            {customized property}: any(...)
          }
          referenceName: 'string'
          type: 'string'
        }
        linkedService: {
          parameters: {
            {customized property}: any(...)
          }
          referenceName: 'string'
          type: 'string'
        }
        name: 'string'
        schemaLinkedService: {
          parameters: {
            {customized property}: any(...)
          }
          referenceName: 'string'
          type: 'string'
        }
        script: 'string'
      }
    ]
  }
}

Property Values

Microsoft.DataFactory/factories/dataflows

Name Description Value
name The resource name string

Constraints:
Min length = 1
Max length = 260
Pattern = ^[A-Za-z0-9_][^<>*#.%&:\\+?/]*$ (required)
parent In Bicep, you can specify the parent resource for a child resource. You only need to add this property when the child resource is declared outside of the parent resource.

For more information, see Child resource outside parent resource.
Symbolic name for resource of type: factories
properties Data flow properties. DataFlow (required)

DataFlow

Name Description Value
annotations List of tags that can be used for describing the data flow. any[]
description The description of the data flow. string
folder The folder that this data flow is in. If not specified, Data flow will appear at the root level. DataFlowFolder
type Set to 'Flowlet' for type Flowlet. Set to 'MappingDataFlow' for type MappingDataFlow. Set to 'WranglingDataFlow' for type WranglingDataFlow. 'Flowlet'
'MappingDataFlow'
'WranglingDataFlow' (required)

DataFlowFolder

Name Description Value
name The name of the folder that this data flow is in. string

DataFlowReference

Name Description Value
datasetParameters Reference data flow parameters from dataset. any
parameters Data flow parameters DataFlowReferenceParameters
referenceName Reference data flow name. string (required)
type Data flow reference type. 'DataFlowReference' (required)

DataFlowReferenceParameters

Name Description Value

DataFlowSink

Name Description Value
dataset Dataset reference. DatasetReference
description Transformation description. string
flowlet Flowlet Reference DataFlowReference
linkedService Linked service reference. LinkedServiceReference
name Transformation name. string (required)
rejectedDataLinkedService Rejected data linked service reference. LinkedServiceReference
schemaLinkedService Schema linked service reference. LinkedServiceReference

DataFlowSource

Name Description Value
dataset Dataset reference. DatasetReference
description Transformation description. string
flowlet Flowlet Reference DataFlowReference
linkedService Linked service reference. LinkedServiceReference
name Transformation name. string (required)
schemaLinkedService Schema linked service reference. LinkedServiceReference

DatasetReference

Name Description Value
parameters Arguments for dataset. DatasetReferenceParameters
referenceName Reference dataset name. string (required)
type Dataset reference type. 'DatasetReference' (required)

DatasetReferenceParameters

Name Description Value

Flowlet

Name Description Value
type Type of data flow. 'Flowlet' (required)
typeProperties Flowlet type properties. FlowletTypeProperties

FlowletTypeProperties

Name Description Value
script Flowlet script. string
scriptLines Flowlet script lines. string[]
sinks List of sinks in Flowlet. DataFlowSink[]
sources List of sources in Flowlet. DataFlowSource[]
transformations List of transformations in Flowlet. Transformation[]

LinkedServiceReference

Name Description Value
parameters Arguments for LinkedService. LinkedServiceReferenceParameters
referenceName Reference LinkedService name. string (required)
type Linked service reference type. 'LinkedServiceReference' (required)

LinkedServiceReferenceParameters

Name Description Value

MappingDataFlow

Name Description Value
type Type of data flow. 'MappingDataFlow' (required)
typeProperties Mapping data flow type properties. MappingDataFlowTypeProperties

MappingDataFlowTypeProperties

Name Description Value
script DataFlow script. string
scriptLines Data flow script lines. string[]
sinks List of sinks in data flow. DataFlowSink[]
sources List of sources in data flow. DataFlowSource[]
transformations List of transformations in data flow. Transformation[]

PowerQuerySource

Name Description Value
dataset Dataset reference. DatasetReference
description Transformation description. string
flowlet Flowlet Reference DataFlowReference
linkedService Linked service reference. LinkedServiceReference
name Transformation name. string (required)
schemaLinkedService Schema linked service reference. LinkedServiceReference
script source script. string

PowerQueryTypeProperties

Name Description Value
documentLocale Locale of the Power query mashup document. string
script Power query mashup script. string
sources List of sources in Power Query. PowerQuerySource[]

Transformation

Name Description Value
dataset Dataset reference. DatasetReference
description Transformation description. string
flowlet Flowlet Reference DataFlowReference
linkedService Linked service reference. LinkedServiceReference
name Transformation name. string (required)

WranglingDataFlow

Name Description Value
type Type of data flow. 'WranglingDataFlow' (required)
typeProperties PowerQuery data flow type properties. PowerQueryTypeProperties

ARM template resource definition

The factories/dataflows resource type can be deployed with operations that target:

Usage Examples

Resource format

To create a Microsoft.DataFactory/factories/dataflows resource, add the following JSON to your template.

{
  "type": "Microsoft.DataFactory/factories/dataflows",
  "apiVersion": "2018-06-01",
  "name": "string",
  "properties": {
    "annotations": [ {} ],
    "description": "string",
    "folder": {
      "name": "string"
    },
    "type": "string"
    // For remaining properties, see DataFlow objects
  }
}

DataFlow objects

Set the type property to specify the type of object.

For Flowlet, use:

{
  "type": "Flowlet",
  "typeProperties": {
    "script": "string",
    "scriptLines": [ "string" ],
    "sinks": [
      {
        "dataset": {
          "parameters": {
            "{customized property}": {}
          },
          "referenceName": "string",
          "type": "string"
        },
        "description": "string",
        "flowlet": {
          "datasetParameters": {},
          "parameters": {
            "{customized property}": {}
          },
          "referenceName": "string",
          "type": "string"
        },
        "linkedService": {
          "parameters": {
            "{customized property}": {}
          },
          "referenceName": "string",
          "type": "string"
        },
        "name": "string",
        "rejectedDataLinkedService": {
          "parameters": {
            "{customized property}": {}
          },
          "referenceName": "string",
          "type": "string"
        },
        "schemaLinkedService": {
          "parameters": {
            "{customized property}": {}
          },
          "referenceName": "string",
          "type": "string"
        }
      }
    ],
    "sources": [
      {
        "dataset": {
          "parameters": {
            "{customized property}": {}
          },
          "referenceName": "string",
          "type": "string"
        },
        "description": "string",
        "flowlet": {
          "datasetParameters": {},
          "parameters": {
            "{customized property}": {}
          },
          "referenceName": "string",
          "type": "string"
        },
        "linkedService": {
          "parameters": {
            "{customized property}": {}
          },
          "referenceName": "string",
          "type": "string"
        },
        "name": "string",
        "schemaLinkedService": {
          "parameters": {
            "{customized property}": {}
          },
          "referenceName": "string",
          "type": "string"
        }
      }
    ],
    "transformations": [
      {
        "dataset": {
          "parameters": {
            "{customized property}": {}
          },
          "referenceName": "string",
          "type": "string"
        },
        "description": "string",
        "flowlet": {
          "datasetParameters": {},
          "parameters": {
            "{customized property}": {}
          },
          "referenceName": "string",
          "type": "string"
        },
        "linkedService": {
          "parameters": {
            "{customized property}": {}
          },
          "referenceName": "string",
          "type": "string"
        },
        "name": "string"
      }
    ]
  }
}

For MappingDataFlow, use:

{
  "type": "MappingDataFlow",
  "typeProperties": {
    "script": "string",
    "scriptLines": [ "string" ],
    "sinks": [
      {
        "dataset": {
          "parameters": {
            "{customized property}": {}
          },
          "referenceName": "string",
          "type": "string"
        },
        "description": "string",
        "flowlet": {
          "datasetParameters": {},
          "parameters": {
            "{customized property}": {}
          },
          "referenceName": "string",
          "type": "string"
        },
        "linkedService": {
          "parameters": {
            "{customized property}": {}
          },
          "referenceName": "string",
          "type": "string"
        },
        "name": "string",
        "rejectedDataLinkedService": {
          "parameters": {
            "{customized property}": {}
          },
          "referenceName": "string",
          "type": "string"
        },
        "schemaLinkedService": {
          "parameters": {
            "{customized property}": {}
          },
          "referenceName": "string",
          "type": "string"
        }
      }
    ],
    "sources": [
      {
        "dataset": {
          "parameters": {
            "{customized property}": {}
          },
          "referenceName": "string",
          "type": "string"
        },
        "description": "string",
        "flowlet": {
          "datasetParameters": {},
          "parameters": {
            "{customized property}": {}
          },
          "referenceName": "string",
          "type": "string"
        },
        "linkedService": {
          "parameters": {
            "{customized property}": {}
          },
          "referenceName": "string",
          "type": "string"
        },
        "name": "string",
        "schemaLinkedService": {
          "parameters": {
            "{customized property}": {}
          },
          "referenceName": "string",
          "type": "string"
        }
      }
    ],
    "transformations": [
      {
        "dataset": {
          "parameters": {
            "{customized property}": {}
          },
          "referenceName": "string",
          "type": "string"
        },
        "description": "string",
        "flowlet": {
          "datasetParameters": {},
          "parameters": {
            "{customized property}": {}
          },
          "referenceName": "string",
          "type": "string"
        },
        "linkedService": {
          "parameters": {
            "{customized property}": {}
          },
          "referenceName": "string",
          "type": "string"
        },
        "name": "string"
      }
    ]
  }
}

For WranglingDataFlow, use:

{
  "type": "WranglingDataFlow",
  "typeProperties": {
    "documentLocale": "string",
    "script": "string",
    "sources": [
      {
        "dataset": {
          "parameters": {
            "{customized property}": {}
          },
          "referenceName": "string",
          "type": "string"
        },
        "description": "string",
        "flowlet": {
          "datasetParameters": {},
          "parameters": {
            "{customized property}": {}
          },
          "referenceName": "string",
          "type": "string"
        },
        "linkedService": {
          "parameters": {
            "{customized property}": {}
          },
          "referenceName": "string",
          "type": "string"
        },
        "name": "string",
        "schemaLinkedService": {
          "parameters": {
            "{customized property}": {}
          },
          "referenceName": "string",
          "type": "string"
        },
        "script": "string"
      }
    ]
  }
}

Property Values

Microsoft.DataFactory/factories/dataflows

Name Description Value
apiVersion The api version '2018-06-01'
name The resource name string

Constraints:
Min length = 1
Max length = 260
Pattern = ^[A-Za-z0-9_][^<>*#.%&:\\+?/]*$ (required)
properties Data flow properties. DataFlow (required)
type The resource type 'Microsoft.DataFactory/factories/dataflows'

DataFlow

Name Description Value
annotations List of tags that can be used for describing the data flow. any[]
description The description of the data flow. string
folder The folder that this data flow is in. If not specified, Data flow will appear at the root level. DataFlowFolder
type Set to 'Flowlet' for type Flowlet. Set to 'MappingDataFlow' for type MappingDataFlow. Set to 'WranglingDataFlow' for type WranglingDataFlow. 'Flowlet'
'MappingDataFlow'
'WranglingDataFlow' (required)

DataFlowFolder

Name Description Value
name The name of the folder that this data flow is in. string

DataFlowReference

Name Description Value
datasetParameters Reference data flow parameters from dataset. any
parameters Data flow parameters DataFlowReferenceParameters
referenceName Reference data flow name. string (required)
type Data flow reference type. 'DataFlowReference' (required)

DataFlowReferenceParameters

Name Description Value

DataFlowSink

Name Description Value
dataset Dataset reference. DatasetReference
description Transformation description. string
flowlet Flowlet Reference DataFlowReference
linkedService Linked service reference. LinkedServiceReference
name Transformation name. string (required)
rejectedDataLinkedService Rejected data linked service reference. LinkedServiceReference
schemaLinkedService Schema linked service reference. LinkedServiceReference

DataFlowSource

Name Description Value
dataset Dataset reference. DatasetReference
description Transformation description. string
flowlet Flowlet Reference DataFlowReference
linkedService Linked service reference. LinkedServiceReference
name Transformation name. string (required)
schemaLinkedService Schema linked service reference. LinkedServiceReference

DatasetReference

Name Description Value
parameters Arguments for dataset. DatasetReferenceParameters
referenceName Reference dataset name. string (required)
type Dataset reference type. 'DatasetReference' (required)

DatasetReferenceParameters

Name Description Value

Flowlet

Name Description Value
type Type of data flow. 'Flowlet' (required)
typeProperties Flowlet type properties. FlowletTypeProperties

FlowletTypeProperties

Name Description Value
script Flowlet script. string
scriptLines Flowlet script lines. string[]
sinks List of sinks in Flowlet. DataFlowSink[]
sources List of sources in Flowlet. DataFlowSource[]
transformations List of transformations in Flowlet. Transformation[]

LinkedServiceReference

Name Description Value
parameters Arguments for LinkedService. LinkedServiceReferenceParameters
referenceName Reference LinkedService name. string (required)
type Linked service reference type. 'LinkedServiceReference' (required)

LinkedServiceReferenceParameters

Name Description Value

MappingDataFlow

Name Description Value
type Type of data flow. 'MappingDataFlow' (required)
typeProperties Mapping data flow type properties. MappingDataFlowTypeProperties

MappingDataFlowTypeProperties

Name Description Value
script DataFlow script. string
scriptLines Data flow script lines. string[]
sinks List of sinks in data flow. DataFlowSink[]
sources List of sources in data flow. DataFlowSource[]
transformations List of transformations in data flow. Transformation[]

PowerQuerySource

Name Description Value
dataset Dataset reference. DatasetReference
description Transformation description. string
flowlet Flowlet Reference DataFlowReference
linkedService Linked service reference. LinkedServiceReference
name Transformation name. string (required)
schemaLinkedService Schema linked service reference. LinkedServiceReference
script source script. string

PowerQueryTypeProperties

Name Description Value
documentLocale Locale of the Power query mashup document. string
script Power query mashup script. string
sources List of sources in Power Query. PowerQuerySource[]

Transformation

Name Description Value
dataset Dataset reference. DatasetReference
description Transformation description. string
flowlet Flowlet Reference DataFlowReference
linkedService Linked service reference. LinkedServiceReference
name Transformation name. string (required)

WranglingDataFlow

Name Description Value
type Type of data flow. 'WranglingDataFlow' (required)
typeProperties PowerQuery data flow type properties. PowerQueryTypeProperties

Terraform (AzAPI provider) resource definition

The factories/dataflows resource type can be deployed with operations that target:

  • Resource groups For a list of changed properties in each API version, see change log.

Usage Examples

Terraform Samples

A basic example of deploying Data Flow inside an Azure Data Factory.

terraform {
  required_providers {
    azapi = {
      source = "Azure/azapi"
    }
  }
}

provider "azapi" {
  skip_provider_registration = false
}

variable "resource_name" {
  type    = string
  default = "acctest0001"
}

variable "location" {
  type    = string
  default = "westeurope"
}

resource "azapi_resource" "resourceGroup" {
  type     = "Microsoft.Resources/resourceGroups@2020-06-01"
  name     = var.resource_name
  location = var.location
}

resource "azapi_resource" "factory" {
  type      = "Microsoft.DataFactory/factories@2018-06-01"
  parent_id = azapi_resource.resourceGroup.id
  name      = var.resource_name
  location  = var.location
  body = {
    properties = {
      publicNetworkAccess = "Enabled"
      repoConfiguration   = null
    }
  }
  schema_validation_enabled = false
  response_export_values    = ["*"]
}

resource "azapi_resource" "storageAccount" {
  type      = "Microsoft.Storage/storageAccounts@2021-09-01"
  parent_id = azapi_resource.resourceGroup.id
  name      = var.resource_name
  location  = var.location
  body = {
    kind = "StorageV2"
    properties = {
      accessTier                   = "Hot"
      allowBlobPublicAccess        = true
      allowCrossTenantReplication  = true
      allowSharedKeyAccess         = true
      defaultToOAuthAuthentication = false
      encryption = {
        keySource = "Microsoft.Storage"
        services = {
          queue = {
            keyType = "Service"
          }
          table = {
            keyType = "Service"
          }
        }
      }
      isHnsEnabled      = false
      isNfsV3Enabled    = false
      isSftpEnabled     = false
      minimumTlsVersion = "TLS1_2"
      networkAcls = {
        defaultAction = "Allow"
      }
      publicNetworkAccess      = "Enabled"
      supportsHttpsTrafficOnly = true
    }
    sku = {
      name = "Standard_LRS"
    }
  }
  schema_validation_enabled = false
  response_export_values    = ["*"]
}

resource "azapi_resource" "linkedservice" {
  type      = "Microsoft.DataFactory/factories/linkedservices@2018-06-01"
  parent_id = azapi_resource.factory.id
  name      = var.resource_name
  body = {
    properties = {
      description = ""
      type        = "AzureBlobStorage"
      typeProperties = {
        serviceEndpoint = azapi_resource.storageAccount.output.properties.primaryEndpoints.blob
      }
    }
  }
  schema_validation_enabled = false
  response_export_values    = ["*"]
}

resource "azapi_resource" "dataflow" {
  type      = "Microsoft.DataFactory/factories/dataflows@2018-06-01"
  parent_id = azapi_resource.factory.id
  name      = var.resource_name
  body = {
    properties = {
      description = ""
      type        = "Flowlet"
      typeProperties = {
        script = "source(\n  allowSchemaDrift: true, \n  validateSchema: false, \n  limit: 100, \n  ignoreNoFilesFound: false, \n  documentForm: 'documentPerLine') ~> source1 \nsource1 sink(\n  allowSchemaDrift: true, \n  validateSchema: false, \n  skipDuplicateMapInputs: true, \n  skipDuplicateMapOutputs: true) ~> sink1\n"
        sinks = [
          {
            description = ""
            linkedService = {
              parameters = {
              }
              referenceName = azapi_resource.linkedservice.name
              type          = "LinkedServiceReference"
            }
            name = "sink1"
          },
        ]
        sources = [
          {
            description = ""
            linkedService = {
              parameters = {
              }
              referenceName = azapi_resource.linkedservice.name
              type          = "LinkedServiceReference"
            }
            name = "source1"
          },
        ]
      }
    }
  }
  schema_validation_enabled = false
  response_export_values    = ["*"]
}

Resource format

To create a Microsoft.DataFactory/factories/dataflows resource, add the following Terraform to your template.

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.DataFactory/factories/dataflows@2018-06-01"
  name = "string"
  parent_id = "string"
  body = {
    properties = {
      annotations = [
        ?
      ]
      description = "string"
      folder = {
        name = "string"
      }
      type = "string"
      // For remaining properties, see DataFlow objects
    }
  }
}

DataFlow objects

Set the type property to specify the type of object.

For Flowlet, use:

{
  type = "Flowlet"
  typeProperties = {
    script = "string"
    scriptLines = [
      "string"
    ]
    sinks = [
      {
        dataset = {
          parameters = {
            {customized property} = ?
          }
          referenceName = "string"
          type = "string"
        }
        description = "string"
        flowlet = {
          datasetParameters = ?
          parameters = {
            {customized property} = ?
          }
          referenceName = "string"
          type = "string"
        }
        linkedService = {
          parameters = {
            {customized property} = ?
          }
          referenceName = "string"
          type = "string"
        }
        name = "string"
        rejectedDataLinkedService = {
          parameters = {
            {customized property} = ?
          }
          referenceName = "string"
          type = "string"
        }
        schemaLinkedService = {
          parameters = {
            {customized property} = ?
          }
          referenceName = "string"
          type = "string"
        }
      }
    ]
    sources = [
      {
        dataset = {
          parameters = {
            {customized property} = ?
          }
          referenceName = "string"
          type = "string"
        }
        description = "string"
        flowlet = {
          datasetParameters = ?
          parameters = {
            {customized property} = ?
          }
          referenceName = "string"
          type = "string"
        }
        linkedService = {
          parameters = {
            {customized property} = ?
          }
          referenceName = "string"
          type = "string"
        }
        name = "string"
        schemaLinkedService = {
          parameters = {
            {customized property} = ?
          }
          referenceName = "string"
          type = "string"
        }
      }
    ]
    transformations = [
      {
        dataset = {
          parameters = {
            {customized property} = ?
          }
          referenceName = "string"
          type = "string"
        }
        description = "string"
        flowlet = {
          datasetParameters = ?
          parameters = {
            {customized property} = ?
          }
          referenceName = "string"
          type = "string"
        }
        linkedService = {
          parameters = {
            {customized property} = ?
          }
          referenceName = "string"
          type = "string"
        }
        name = "string"
      }
    ]
  }
}

For MappingDataFlow, use:

{
  type = "MappingDataFlow"
  typeProperties = {
    script = "string"
    scriptLines = [
      "string"
    ]
    sinks = [
      {
        dataset = {
          parameters = {
            {customized property} = ?
          }
          referenceName = "string"
          type = "string"
        }
        description = "string"
        flowlet = {
          datasetParameters = ?
          parameters = {
            {customized property} = ?
          }
          referenceName = "string"
          type = "string"
        }
        linkedService = {
          parameters = {
            {customized property} = ?
          }
          referenceName = "string"
          type = "string"
        }
        name = "string"
        rejectedDataLinkedService = {
          parameters = {
            {customized property} = ?
          }
          referenceName = "string"
          type = "string"
        }
        schemaLinkedService = {
          parameters = {
            {customized property} = ?
          }
          referenceName = "string"
          type = "string"
        }
      }
    ]
    sources = [
      {
        dataset = {
          parameters = {
            {customized property} = ?
          }
          referenceName = "string"
          type = "string"
        }
        description = "string"
        flowlet = {
          datasetParameters = ?
          parameters = {
            {customized property} = ?
          }
          referenceName = "string"
          type = "string"
        }
        linkedService = {
          parameters = {
            {customized property} = ?
          }
          referenceName = "string"
          type = "string"
        }
        name = "string"
        schemaLinkedService = {
          parameters = {
            {customized property} = ?
          }
          referenceName = "string"
          type = "string"
        }
      }
    ]
    transformations = [
      {
        dataset = {
          parameters = {
            {customized property} = ?
          }
          referenceName = "string"
          type = "string"
        }
        description = "string"
        flowlet = {
          datasetParameters = ?
          parameters = {
            {customized property} = ?
          }
          referenceName = "string"
          type = "string"
        }
        linkedService = {
          parameters = {
            {customized property} = ?
          }
          referenceName = "string"
          type = "string"
        }
        name = "string"
      }
    ]
  }
}

For WranglingDataFlow, use:

{
  type = "WranglingDataFlow"
  typeProperties = {
    documentLocale = "string"
    script = "string"
    sources = [
      {
        dataset = {
          parameters = {
            {customized property} = ?
          }
          referenceName = "string"
          type = "string"
        }
        description = "string"
        flowlet = {
          datasetParameters = ?
          parameters = {
            {customized property} = ?
          }
          referenceName = "string"
          type = "string"
        }
        linkedService = {
          parameters = {
            {customized property} = ?
          }
          referenceName = "string"
          type = "string"
        }
        name = "string"
        schemaLinkedService = {
          parameters = {
            {customized property} = ?
          }
          referenceName = "string"
          type = "string"
        }
        script = "string"
      }
    ]
  }
}

Property Values

Microsoft.DataFactory/factories/dataflows

Name Description Value
name The resource name string

Constraints:
Min length = 1
Max length = 260
Pattern = ^[A-Za-z0-9_][^<>*#.%&:\\+?/]*$ (required)
parent_id The ID of the resource that is the parent for this resource. ID for resource of type: factories
properties Data flow properties. DataFlow (required)
type The resource type "Microsoft.DataFactory/factories/dataflows@2018-06-01"

DataFlow

Name Description Value
annotations List of tags that can be used for describing the data flow. any[]
description The description of the data flow. string
folder The folder that this data flow is in. If not specified, Data flow will appear at the root level. DataFlowFolder
type Set to 'Flowlet' for type Flowlet. Set to 'MappingDataFlow' for type MappingDataFlow. Set to 'WranglingDataFlow' for type WranglingDataFlow. 'Flowlet'
'MappingDataFlow'
'WranglingDataFlow' (required)

DataFlowFolder

Name Description Value
name The name of the folder that this data flow is in. string

DataFlowReference

Name Description Value
datasetParameters Reference data flow parameters from dataset. any
parameters Data flow parameters DataFlowReferenceParameters
referenceName Reference data flow name. string (required)
type Data flow reference type. 'DataFlowReference' (required)

DataFlowReferenceParameters

Name Description Value

DataFlowSink

Name Description Value
dataset Dataset reference. DatasetReference
description Transformation description. string
flowlet Flowlet Reference DataFlowReference
linkedService Linked service reference. LinkedServiceReference
name Transformation name. string (required)
rejectedDataLinkedService Rejected data linked service reference. LinkedServiceReference
schemaLinkedService Schema linked service reference. LinkedServiceReference

DataFlowSource

Name Description Value
dataset Dataset reference. DatasetReference
description Transformation description. string
flowlet Flowlet Reference DataFlowReference
linkedService Linked service reference. LinkedServiceReference
name Transformation name. string (required)
schemaLinkedService Schema linked service reference. LinkedServiceReference

DatasetReference

Name Description Value
parameters Arguments for dataset. DatasetReferenceParameters
referenceName Reference dataset name. string (required)
type Dataset reference type. 'DatasetReference' (required)

DatasetReferenceParameters

Name Description Value

Flowlet

Name Description Value
type Type of data flow. 'Flowlet' (required)
typeProperties Flowlet type properties. FlowletTypeProperties

FlowletTypeProperties

Name Description Value
script Flowlet script. string
scriptLines Flowlet script lines. string[]
sinks List of sinks in Flowlet. DataFlowSink[]
sources List of sources in Flowlet. DataFlowSource[]
transformations List of transformations in Flowlet. Transformation[]

LinkedServiceReference

Name Description Value
parameters Arguments for LinkedService. LinkedServiceReferenceParameters
referenceName Reference LinkedService name. string (required)
type Linked service reference type. 'LinkedServiceReference' (required)

LinkedServiceReferenceParameters

Name Description Value

MappingDataFlow

Name Description Value
type Type of data flow. 'MappingDataFlow' (required)
typeProperties Mapping data flow type properties. MappingDataFlowTypeProperties

MappingDataFlowTypeProperties

Name Description Value
script DataFlow script. string
scriptLines Data flow script lines. string[]
sinks List of sinks in data flow. DataFlowSink[]
sources List of sources in data flow. DataFlowSource[]
transformations List of transformations in data flow. Transformation[]

PowerQuerySource

Name Description Value
dataset Dataset reference. DatasetReference
description Transformation description. string
flowlet Flowlet Reference DataFlowReference
linkedService Linked service reference. LinkedServiceReference
name Transformation name. string (required)
schemaLinkedService Schema linked service reference. LinkedServiceReference
script source script. string

PowerQueryTypeProperties

Name Description Value
documentLocale Locale of the Power query mashup document. string
script Power query mashup script. string
sources List of sources in Power Query. PowerQuerySource[]

Transformation

Name Description Value
dataset Dataset reference. DatasetReference
description Transformation description. string
flowlet Flowlet Reference DataFlowReference
linkedService Linked service reference. LinkedServiceReference
name Transformation name. string (required)

WranglingDataFlow

Name Description Value
type Type of data flow. 'WranglingDataFlow' (required)
typeProperties PowerQuery data flow type properties. PowerQueryTypeProperties