{ "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", "parameters": { "factoryName": { "type": "string", "metadata": "Data Factory name", "defaultValue": "private-adf-1-ukw" }, "AzureBlobStorage1_connectionString": { "type": "secureString", "metadata": "Secure string for 'connectionString' of 'AzureBlobStorage1'" } }, "variables": { "factoryId": "[concat('Microsoft.DataFactory/factories/', parameters('factoryName'))]" }, "resources": [ { "name": "[concat(parameters('factoryName'), '/AzureBlobStorage1')]", "type": "Microsoft.DataFactory/factories/linkedServices", "apiVersion": "2018-06-01", "properties": { "annotations": [], "type": "AzureBlobStorage", "typeProperties": { "connectionString": "[parameters('AzureBlobStorage1_connectionString')]" } }, "dependsOn": [] }, { "name": "[concat(parameters('factoryName'), '/Json2')]", "type": "Microsoft.DataFactory/factories/datasets", "apiVersion": "2018-06-01", "properties": { "linkedServiceName": { "referenceName": "AzureBlobStorage1", "type": "LinkedServiceReference" }, "annotations": [], "type": "Json", "typeProperties": { "location": { "type": "AzureBlobStorageLocation", "fileName": "test1output", "folderPath": "output", "container": "testbase64" } }, "schema": { "type": "object", "properties": { "ContactEmail": { "type": "string" } } } }, "dependsOn": [ "[concat(variables('factoryId'), '/linkedServices/AzureBlobStorage1')]" ] }, { "name": "[concat(parameters('factoryName'), '/Json1')]", "type": "Microsoft.DataFactory/factories/datasets", "apiVersion": "2018-06-01", "properties": { "linkedServiceName": { "referenceName": "AzureBlobStorage1", "type": "LinkedServiceReference" }, "annotations": [], "type": "Json", "typeProperties": { "location": { "type": "AzureBlobStorageLocation", "fileName": "test1", "folderPath": "files", "container": "testbase64" } }, "schema": { "type": "object", "properties": { "ContactEmail": { "type": "string" } } } }, "dependsOn": [ "[concat(variables('factoryId'), '/linkedServices/AzureBlobStorage1')]" ] }, { "name": "[concat(parameters('factoryName'), '/dataflow1')]", "type": "Microsoft.DataFactory/factories/dataflows", "apiVersion": "2018-06-01", "properties": { "type": "MappingDataFlow", "typeProperties": { "sources": [ { "dataset": { "referenceName": "Json1", "type": "DatasetReference" }, "name": "source1" } ], "sinks": [ { "dataset": { "referenceName": "Json2", "type": "DatasetReference" }, "name": "sink1", "rejectedDataLinkedService": { "referenceName": "AzureBlobStorage1", "type": "LinkedServiceReference" } } ], "transformations": [ { "name": "derivedColumn1" }, { "name": "derivedColumn2" } ], "scriptLines": [ "source(output(", " ContactEmail as string", " ),", " allowSchemaDrift: true,", " validateSchema: false,", " ignoreNoFilesFound: false,", " documentForm: 'documentPerLine') ~> source1", "derivedColumn2 derive(ContactEmail = toBase64(ContactEmail)) ~> derivedColumn1", "source1 derive(ContactEmail = ContactEmail) ~> derivedColumn2", "derivedColumn1 sink(allowSchemaDrift: true,", " validateSchema: false,", " input(", " ContactEmail as string", " ),", " partitionFileNames:['test1output'],", " truncate: true,", " skipDuplicateMapInputs: true,", " skipDuplicateMapOutputs: true,", " mapColumn(", " ContactEmail", " ),", " partitionBy('hash', 1)) ~> sink1" ] } }, "dependsOn": [ "[concat(variables('factoryId'), '/datasets/Json1')]", "[concat(variables('factoryId'), '/datasets/Json2')]", "[concat(variables('factoryId'), '/linkedServices/AzureBlobStorage1')]" ] }, { "name": "[concat(parameters('factoryName'), '/pipeline1')]", "type": "Microsoft.DataFactory/factories/pipelines", "apiVersion": "2018-06-01", "properties": { "activities": [ { "name": "Data flow1", "type": "ExecuteDataFlow", "dependsOn": [], "policy": { "timeout": "0.12:00:00", "retry": 0, "retryIntervalInSeconds": 30, "secureOutput": false, "secureInput": false }, "userProperties": [], "typeProperties": { "dataflow": { "referenceName": "dataflow1", "type": "DataFlowReference", "parameters": {}, "datasetParameters": { "source1": {}, "sink1": {} } }, "staging": {}, "compute": { "coreCount": 8, "computeType": "General" }, "traceLevel": "Fine" } } ], "policy": { "elapsedTimeMetric": {} }, "annotations": [], "lastPublishTime": "2024-04-24T09:12:29Z" }, "dependsOn": [ "[concat(variables('factoryId'), '/dataflows/dataflow1')]" ] } ] }