Updating pipeline: CopyAndMapAWEntity

This commit is contained in:
Richard Swinbank 2022-10-22 16:49:48 +01:00
parent a9db253572
commit a8a73d3076

View File

@ -3,7 +3,65 @@
"properties": { "properties": {
"activities": [ "activities": [
{ {
"name": "Copy data1", "name": "Get catalog",
"type": "WebActivity",
"dependsOn": [],
"policy": {
"timeout": "0.12:00:00",
"retry": 0,
"retryIntervalInSeconds": 30,
"secureOutput": false,
"secureInput": false
},
"userProperties": [],
"typeProperties": {
"url": {
"value": "https://raw.githubusercontent.com/richardswinbank/adf-metadata/main/catalog.json",
"type": "Expression"
},
"method": "GET"
}
},
{
"name": "Cache catalog as JSON array",
"type": "SetVariable",
"dependsOn": [
{
"activity": "Get catalog",
"dependencyConditions": [
"Succeeded"
]
}
],
"userProperties": [],
"typeProperties": {
"variableName": "Catalog",
"value": {
"value": "@json(activity('Get catalog').output.Response)",
"type": "Expression"
}
}
},
{
"name": "ForEach AW entity",
"type": "ForEach",
"dependsOn": [
{
"activity": "Cache catalog as JSON array",
"dependencyConditions": [
"Succeeded"
]
}
],
"userProperties": [],
"typeProperties": {
"items": {
"value": "@variables('Catalog')",
"type": "Expression"
},
"activities": [
{
"name": "Copy AW entity",
"type": "Copy", "type": "Copy",
"dependsOn": [], "dependsOn": [],
"policy": { "policy": {
@ -36,54 +94,8 @@
}, },
"enableStaging": false, "enableStaging": false,
"translator": { "translator": {
"type": "TabularTranslator", "value": "@item().translator",
"mappings": [ "type": "Expression"
{
"source": {
"type": "Int32",
"ordinal": 1
},
"sink": {
"name": "ProductCategoryID",
"physicalType": "UTF8"
}
},
{
"source": {
"type": "String",
"ordinal": 2
},
"sink": {
"name": "Name",
"physicalType": "UTF8"
}
},
{
"source": {
"type": "Guid",
"ordinal": 3
},
"sink": {
"name": "rowguid",
"physicalType": "UTF8"
}
},
{
"source": {
"type": "DateTime",
"ordinal": 4
},
"sink": {
"name": "ModifiedDate",
"physicalType": "UTF8"
}
}
],
"typeConversion": true,
"typeConversionSettings": {
"allowDataTruncation": true,
"treatBooleanAsNumber": false
}
} }
}, },
"inputs": [ "inputs": [
@ -92,7 +104,7 @@
"type": "DatasetReference", "type": "DatasetReference",
"parameters": { "parameters": {
"EntityName": { "EntityName": {
"value": "@pipeline().parameters.EntityName", "value": "@item().EntityName",
"type": "Expression" "type": "Expression"
} }
} }
@ -104,13 +116,16 @@
"type": "DatasetReference", "type": "DatasetReference",
"parameters": { "parameters": {
"EntityName": { "EntityName": {
"value": "@pipeline().parameters.EntityName", "value": "@item().EntityName",
"type": "Expression" "type": "Expression"
} }
} }
} }
] ]
} }
]
}
}
], ],
"parameters": { "parameters": {
"EntityName": { "EntityName": {
@ -118,6 +133,12 @@
"defaultValue": "ProductCategory" "defaultValue": "ProductCategory"
} }
}, },
"variables": {
"Catalog": {
"type": "Array",
"defaultValue": []
}
},
"folder": { "folder": {
"name": "Labs2" "name": "Labs2"
}, },