英文:
Embed a parameter into a activity object call
问题
I'm using a json file for reading in config parameters.
{"process_delta":
{
"primary_keys": ["id"],
"schema_name": "schema",
"table_name": "table",
"source_path":"folder/table/"
}
}
Then in my pipeline with a lookup activity I can call the source_path
in subgroup process_delta
with this:
@activity('Lookup config details').output.firstRow.process_delta.source_path
That works.
My issue is I want to make my pipeline nice and generic to enable reuse, and some existing pipelines don't have the same name for their sections. Is there a way to put a parameter into that formula so the subgroup can be different and still return the source_path value in it?
So like this:
@activity('Lookup config details').output.firstRow.<something_resolved from_a_parameter_here>.source_path
I've tried this but it's not happy with it:
@activity('Lookup config details').output.firstRow.@{pipeline().parameters.p_config_section}.source_path
英文:
I'm using a json file for reading in config parameters.
{"process_delta":
{
"primary_keys": ["id"],
"schema_name": "schema",
"table_name": "table",
"source_path":"folder/table/"
}
}
Then in my pipeline with a lookup activity I can call the source_path
in subgroub process_delta
with this:
@activity('Lookup config details').output.firstRow.process_delta.source_path
That works.
My issue is want to make my pipeline nice and generic to enable reuse and some existing pipelines don't have the same name for their sections. Is there a way to put a parameter into that formula so the subgroup can be different and still return the source_path value in it?
so like this:
@activity('Lookup config details').output.firstRow.<something_resolved from_a_parameter_here>.source_path
I've tried this but its not happy with it
@activity('Lookup config details').output.firstRow.@{pipeline().parameters.p_config_section}.source_path
答案1
得分: 1
你可以像下面这样做。
@activity('Lookup1').output.firstRow[pipeline().parameters.param1].source_path
这里我的 param1
值是 "process_delta"
。
结果:
英文:
You can do like below.
@activity('Lookup1').output.firstRow[pipeline().parameters.param1].source_path
Here my param1
value is "process_delta"
.
Result:
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论