AM пытается переопределить некоторое содержимое (пары значений) шаблона ARM (.json), выбирая значения из другого json, но как только пары значений из исходного файла завершены, я хотел бы удалить ненужные пары значений из файла назначения. . как мне это сделать.
Любая помощь по этому вопросу действительно необходима.
Мой пример кода
for($i=0;$i -lt $Getinputfilecontent.Schema.Count;$i++)
{
$individualstructure[$i].name = $Getinputfilecontent.Schema[$i].name
$individualstructure[$i].type = $Getinputfilecontent.Schema[$i].type
$Getjsonfilecontent | ConvertTo-Json -Depth 100 | % {
[System.Text.RegularExpressions.Regex]::Unescape($_) } | set-content
'C:\Scripts\CreateADF-Datasets\arm_template.json'
}
Шаблон ARM, который переопределяется
{
"name": "[concat(parameters('factoryName'), '/Veh_Obj')]",
"type": "Microsoft.DataFactory/factories/datasets",
"apiVersion": "2018-06-01",
"properties": {
"linkedServiceName": {
"referenceName": "AzureDataLakeStore1",
"type": "LinkedServiceReference"
},
"annotations": [],
"type": "AzureDataLakeStoreFile",
"structure": [
{
"name": "TBL_ID",
"type": "int"
},
{
"name": "SYS_ADD_DATE",
"type": "date"
},
{
"name": "SYS_CHG_DATE",
"type": "date"
},
{
"name": "CODE",
"type": "string"
},
{
"name": "Need to remove this value pair",
"type": "Need to remove this value pair"
},
{
"name": "Need to remove this value pair",
"type": "Need to remove this value pair"
},
{
"name": "Need to remove this value pair",
"type": "Need to remove this value pair"
},
{
"name": "Need to remove this value pair",
"type": "Need to remove this value pair"
},
{
"name": "Need to remove this value pair",
"type": "Need to remove this value pair"
},
{
"name": "Need to remove this value pair",
"type": "Need to remove this value pair"
},
{
"name": "Need to remove this value pair",
"type": "Need to remove this value pair"
},
{
"name": "Need to remove this value pair",
"type": "Need to remove this value pair"
},
{
"name": "Need to remove this value pair",
"type": "Need to remove this value pair"
},
{
"name": "Need to remove this value pair",
"type": "Need to remove this value pair"
},
{
"name": "Need to remove this value pair",
"type": "Need to remove this value pair"
},
{
"name": "Need to remove this value pair",
"type": "Need to remove this value pair"
}
],
"typeProperties": {
"format": {
"type": "TextFormat",
"columnDelimiter": "|",
"rowDelimiter": "",
"quoteChar": "\"",
"nullValue": "\"\"",
"encodingName": null,
"treatEmptyAsNull": true,
"skipLineCount": 0,
"firstRowAsHeader": false
},
"fileName": "[parameters('Veh_Obj_properties_typeProperties_fileName')]",
"folderPath": "[parameters('Veh_Obj_properties_typeProperties_folderPath')]"
}
},
"dependsOn": [
"[concat(variables('factoryId'), '/linkedServices/AzureDataLakeStore1')]"
]
}