Skip to content

Instantly share code, notes, and snippets.

@MatthewDavidCampbell
Last active February 23, 2023 07:40
Show Gist options
  • Save MatthewDavidCampbell/9f31dab88c68e080e74390dbe331f37e to your computer and use it in GitHub Desktop.
Save MatthewDavidCampbell/9f31dab88c68e080e74390dbe331f37e to your computer and use it in GitHub Desktop.
ADF Copy activity preserve metadata
{
"name": "AzureBlobStorage",
"properties": {
"linkedServiceName": {
"referenceName": "AzureBlobStorage",
"type": "LinkedServiceReference",
"parameters": {
"StorageAccountKey": {
"value": "@dataset().StorageAccountKey",
"type": "Expression"
},
"StorageAccountName": {
"value": "@dataset().StorageAccountName",
"type": "Expression"
}
}
},
"parameters": {
"StorageAccountKey": {
"type": "string"
},
"StorageAccountName": {
"type": "string"
},
"StorageFilePath": {
"type": "string"
}
},
"annotations": [],
"type": "Binary",
"typeProperties": {
"location": {
"type": "AzureBlobStorageLocation",
"container": {
"value": "@dataset().StorageFilePath",
"type": "Expression"
}
},
"compression": {
"type": "gzip",
"level": "Fastest"
}
}
}
}
{
"name": "Copy",
"type": "Copy",
"dependsOn": [],
"policy": {
"timeout": "0.12:00:00",
"retry": 0,
"retryIntervalInSeconds": 30,
"secureOutput": false,
"secureInput": false
},
"userProperties": [],
"typeProperties": {
"source": {
"type": "BinarySource",
"storeSettings": {
"type": "AzureBlobStorageReadSettings",
"recursive": true
},
"formatSettings": {
"type": "BinaryReadSettings"
}
},
"sink": {
"type": "BinarySink",
"storeSettings": {
"type": "AzureBlobStorageWriteSettings",
"copyBehavior": "PreserveHierarchy"
}
},
"enableStaging": false,
"perserve": [
"Attributes"
]
},
"inputs": [
{
"referenceName": "AzureBlobStorage",
"type": "DatasetReference",
"parameters": {
"StorageAccountKey": {
"value": "@pipeline().parameters.SourceStorageAccountKey",
"type": "Expression"
},
"StorageAccountName": {
"value": "@pipeline().parameters.SourceStorageAccountName",
"type": "Expression"
},
"StorageFilePath": {
"value": "@pipeline().parameters.SourceStorageFilePath",
"type": "Expression"
}
}
}
],
"outputs": [
{
"referenceName": "AzureBlobStorage",
"type": "DatasetReference",
"parameters": {
"StorageAccountKey": {
"value": "@pipeline().parameters.SinkStorageAccountKey",
"type": "Expression"
},
"StorageAccountName": {
"value": "@pipeline().parameters.SinkStorageAccountName",
"type": "Expression"
},
"StorageFilePath": {
"value": "@pipeline().parameters.SinkStorageFilePath",
"type": "Expression"
}
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment