我正在使用 Azure 数据工厂来转换 blob,然后尝试将其复制到 Azure 表存储中。我正在使用复制活动。管道由数据流和复制活动组成。
除了映射我的行键之外,一切都运行良好。我使用转换活动根据产品 SKU 生成行键。当我去接收器并选择“使用源列”时,它在“行键列”下显示一个“选择选项”,但我唯一的选项是“添加动态内容”,并且我没有得到任何列选项。
源中的行键是通过映射函数映射的,但似乎在不指定动态内容的情况下,默认情况下它会被唯一标识符覆盖。由于这些是产品 SKU,并且我想合并数据,因此我绝对需要自己的行键。
我是 ADF 新手,我尝试使用动态内容引用我的 rowkey,但它只会生成未找到的错误。我不确定在编写表达式时是否正确引用了源代码。
我已联系 Azure 支持,正在等待回复,但我们拭目以待。
{
"name": "BlobTransformsToTable",
"properties": {
"activities": [
{
"name": "TransformThenCopyToTable",
"type": "Copy",
"dependsOn": [
{
"activity": "MyVendorCatalog",
"dependencyConditions": [
"Succeeded"
]
}
],
"policy": {
"timeout": "7.00:00:00",
"retry": 0,
"retryIntervalInSeconds": 30,
"secureOutput": false,
"secureInput": false
},
"typeProperties": {
"source": {
"type": "DelimitedTextSource",
"storeSettings": {
"type": "AzureBlobStorageReadSetting",
"wildcardFileName": "*.*"
},
"formatSettings": {
"type": "DelimitedTextReadSetting"
}
},
"sink": {
"type": "AzureTableSink",
"azureTableInsertType": "merge",
"azureTableDefaultPartitionKeyValue": "CatalogItem",
"writeBatchSize": 10000
},
"enableStaging": false,
"translator": {
"type": "TabularTranslator",
"mappings": [
{
"source": {
"name": "PartitionKey",
"type": "String"
},
"sink": {
"name": "PartitionKey"
}
},
{
"source": {
"name": "RowKey",
"type": "String"
},
"sink": {
"name": "RowKey"
}
},
我希望它将源中的 rowkey 映射到接收器中的 rowkey。它仍在产生独特的价值。我愿意通过使用动态内容来解决这个问题,但我不确定如何让它发挥作用。