在Azure数据工厂副本中使用Append Blob是否有任何解决方法? [英] Is there any workaround for using Append blob in Azure Data Factory copy?
问题描述
我不希望我在ADF管道中的复制数据活动覆盖blob文件,而是将新数据附加到该文件中.但是ADF仅支持Blockblob,是否可以将数据追加到现有文件中?
I don't want my copy data activity in ADF pipeline to overwrite a blob file but instead, append the new data to it. But ADF only supports Blockblob so is there a way to append data to an existing file?
推荐答案
您可以使用 Blob服务休息API 可能会发送一个PUT请求,其中包含您要附加到Blob的数据.您可以选择通过此活动使用数据集和链接的服务.
You can use Web Activity instead of Copy Activity. Using Blob Service Rest API you could send a PUT request with data you want to append to a blob. You can optionally consume datasets and linked services by this activity.
JSON:
{
"name":"AppendDataActivity",
"type":"WebActivity",
"typeProperties":{
"method":"Put",
"url":"https://<myAccount>.blob.core.windows.net/<myContainer>/<myBlob><SASToken>&comp=appendblock",
"headers":{
"Content-Type":"application/json"
},
"datasets":[
{
"referenceName":"<consumedDatasetName>",
"type":"DatasetReference",
"parameters":{
...
}
}
],
"linkedServices":[
{
"referenceName":"<consumedLinkedServiceName>",
"type":"LinkedServiceReference"
}
]
}
}
请注意,主体只能支持JSON对象或JSON值,JSON数组是固定的,但不支持非JSON值.对于这种解决方法,您可以使用Azure函数作为终结点,可以在其中附加文件或任何所需的内容.
这篇关于在Azure数据工厂副本中使用Append Blob是否有任何解决方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!