Azure data factory 从管道传递到链接服务baseURL的NULL
我有一个管道,可以迭代文件并将它们复制到存储位置 baseURL和relativeURL存储在json文件中 我可以读入这个文件,它是有效的 我已经参数化了链接的服务baseURL,当从链接的服务和数据集进行测试时,这会起作用 但是,当我尝试调试管道时,出现了一个错误: “代码”:“BadRequest”Azure data factory 从管道传递到链接服务baseURL的NULL,azure-data-factory,azure-data-factory-2,azure-data-factory-pipeline,Azure Data Factory,Azure Data Factory 2,Azure Data Factory Pipeline,我有一个管道,可以迭代文件并将它们复制到存储位置 baseURL和relativeURL存储在json文件中 我可以读入这个文件,它是有效的 我已经参数化了链接的服务baseURL,当从链接的服务和数据集进行测试时,这会起作用 但是,当我尝试调试管道时,出现了一个错误: “代码”:“BadRequest” “消息”:空 “目标”:“管道//runid/310b8ac1-2ce6-4c7c-a1ad-433ee9019e9b” “详细信息”:空 “错误”:空 从管道中的活动中,似乎传递的是空值,而
“消息”:空
“目标”:“管道//runid/310b8ac1-2ce6-4c7c-a1ad-433ee9019e9b”
“详细信息”:空
“错误”:空 从管道中的活动中,似乎传递的是空值,而不是baseURL 我已经迭代了配置文件中的值,并且正在读取它,并且这些值是正确的。管道似乎没有为baseURL传递正确的值 我是否必须修改管道后面的json代码才能让它工作 如果有帮助,链接服务、数据集和管道的json如下所示: --链接服务:
{
"name": "ls_http_opendata_ecdc_europe_eu",
"properties": {
"parameters": {
"baseURL": {
"type": "string"
}
},
"annotations": [],
"type": "HttpServer",
"typeProperties": {
"url": "@linkedService().baseURL",
"enableServerCertificateValidation": true,
"authenticationType": "Anonymous"
}
}
}
--数据集
--管道
我重复了你的错误
{“code”:“BadRequest”,“message”:null,“target”:“pipeline//runid/abd35329-3625-490b-85cf-f6d0de3dac86”,“details”:null,“error”:null}
这是因为您并没有将baseURL传递给源数据集中的链接服务。请这样做:
数据集JSON代码应该如下所示:
{
"name": "ds_ecdc_raw_csv_http",
"properties": {
"linkedServiceName": {
"referenceName": "ls_http_opendata_ecdc_europe_eu",
"type": "LinkedServiceReference",
"parameters": {
"baseURL": {
"value": "@dataset().baseURL",
"type": "Expression"
}
}
},
"parameters": {
"relativeURL": {
"type": "string"
},
"baseURL": {
"type": "string"
}
},
"annotations": [],
"type": "DelimitedText",
"typeProperties": {
"location": {
"type": "HttpServerLocation",
"relativeUrl": {
"value": "@dataset().relativeURL",
"type": "Expression"
}
},
"columnDelimiter": ",",
"escapeChar": "\\",
"firstRowAsHeader": true,
"quoteChar": "\""
},
"schema": []
}
}
非常感谢。我提供的数据集json是由编辑器生成的,我没有以任何方式修改它。在某些情况下,它可能会生成不正确的json。
{
"name": "pl_ingest_ecdc_data",
"properties": {
"activities": [
{
"name": "lookup ecdc filelist",
"type": "Lookup",
"dependsOn": [],
"policy": {
"timeout": "7.00:00:00",
"retry": 0,
"retryIntervalInSeconds": 30,
"secureOutput": false,
"secureInput": false
},
"userProperties": [],
"typeProperties": {
"source": {
"type": "JsonSource",
"storeSettings": {
"type": "AzureBlobStorageReadSettings",
"recursive": true,
"enablePartitionDiscovery": false
},
"formatSettings": {
"type": "JsonReadSettings"
}
},
"dataset": {
"referenceName": "ds_ecdc_file_list",
"type": "DatasetReference"
},
"firstRowOnly": false
}
},
{
"name": "execute copy for every record",
"type": "ForEach",
"dependsOn": [
{
"activity": "lookup ecdc filelist",
"dependencyConditions": [
"Succeeded"
]
}
],
"userProperties": [],
"typeProperties": {
"items": {
"value": "@activity('lookup ecdc filelist').output.value",
"type": "Expression"
},
"activities": [
{
"name": "Copy data1",
"type": "Copy",
"dependsOn": [],
"policy": {
"timeout": "7.00:00:00",
"retry": 0,
"retryIntervalInSeconds": 30,
"secureOutput": false,
"secureInput": false
},
"userProperties": [],
"typeProperties": {
"source": {
"type": "DelimitedTextSource",
"storeSettings": {
"type": "HttpReadSettings",
"requestMethod": "GET"
},
"formatSettings": {
"type": "DelimitedTextReadSettings"
}
},
"sink": {
"type": "DelimitedTextSink",
"storeSettings": {
"type": "AzureBlobFSWriteSettings"
},
"formatSettings": {
"type": "DelimitedTextWriteSettings",
"quoteAllText": true,
"fileExtension": ".txt"
}
},
"enableStaging": false,
"translator": {
"type": "TabularTranslator",
"typeConversion": true,
"typeConversionSettings": {
"allowDataTruncation": true,
"treatBooleanAsNumber": false
}
}
},
"inputs": [
{
"referenceName": "DelimitedText1",
"type": "DatasetReference",
"parameters": {
"sourceBaseURL": {
"value": "@item().sourceBaseURL",
"type": "Expression"
},
"sourceRelativeURL": {
"value": "@item().sourceRelativeURL",
"type": "Expression"
}
}
}
],
"outputs": [
{
"referenceName": "ds_ecdc_raw_csv_dl",
"type": "DatasetReference",
"parameters": {
"fileName": {
"value": "@item().sinkFileName",
"type": "Expression"
}
}
}
]
}
]
}
}
],
"concurrency": 1,
"annotations": []
}
}
{
"name": "ds_ecdc_raw_csv_http",
"properties": {
"linkedServiceName": {
"referenceName": "ls_http_opendata_ecdc_europe_eu",
"type": "LinkedServiceReference",
"parameters": {
"baseURL": {
"value": "@dataset().baseURL",
"type": "Expression"
}
}
},
"parameters": {
"relativeURL": {
"type": "string"
},
"baseURL": {
"type": "string"
}
},
"annotations": [],
"type": "DelimitedText",
"typeProperties": {
"location": {
"type": "HttpServerLocation",
"relativeUrl": {
"value": "@dataset().relativeURL",
"type": "Expression"
}
},
"columnDelimiter": ",",
"escapeChar": "\\",
"firstRowAsHeader": true,
"quoteChar": "\""
},
"schema": []
}
}