【发布时间】:2020-07-22 16:21:16
【问题描述】:
我正在使用 CDAP 参考来启动数据融合批处理管道(GCS 到 GCS)。
curl -w "\n" -X POST -H "Authorization: Bearer ${AUTH_TOKEN}" \
"${CDAP_ENDPOINT}/v3/namespaces/default/apps/${PIPELINE_NAME}/workflows/DataPipelineWorkflow/start" \
-d "{ argfile : '${ARGUMENT_FILE}' }"
其中 argfile 是参数设置器宏的输入 URL
参数json文件为:
{
"arguments": [
{
"name": "input.path",
"type": "string",
"value": "gs://bucket/employee_sample.csv"
},
{
"name": "directive",
"type": "array",
"value": [
"parse-as-csv :body ',' true",
"drop body"
]
},
{
"name": "output.path",
"type": "string",
"value": "gs://bucket/FusionOutput"
},
{
"name": "PROJECT_ID",
"type": "string",
"value": "project-id"
},
{
"name": "output.schema",
"type": "schema",
"value": [
{
"name": "emp_id",
"type": "string",
"nullable": true
},
{
"name": "name_prefix",
"type": "string",
"nullable": true
},
{
"name": "first_name",
"type": "string",
"nullable": true
}
]
}
]
}
这里的问题是我收到了这个错误
Pipeline 'gcs_fusion' failed.
io.cdap.cdap.api.macro.InvalidMacroException: Argument 'input.path' is not defined.
at io.cdap.cdap.etl.common.DefaultMacroEvaluator.lookup(DefaultMacroEvaluator.java:54) ~[na:na]
at io.cdap.cdap.internal.app.runtime.plugin.MacroParser.findRightmostMacro(MacroParser.java:144)
java.lang.RuntimeException: Could not parse response from 'https://storage.cloud.google.com/bucket/argumentj.json': java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 2 column 1
at io.cdap.plugin.ArgumentSetter.handleResponse(ArgumentSetter.java:83) ~[na:na]
at io.cdap.plugin.http.HTTPArgumentSetter.run(HTTPArgumentSetter.java:76) ~[na:na]
当我尝试通过 Data Fusion UI 控制台传递参数设置器 URL 时,相同的管道在某些运行中使用相同的模板。
参数设置器 JSON 遵循https://github.com/data-integrations/argument-setter 中规定的语法,并且参数 json 文件在存储桶中设置为公共。
如果有人能解决这个问题会很有帮助。
请注意,我在这里匿名了我的项目详细信息
【问题讨论】:
标签: google-cloud-platform google-cloud-data-fusion