talend-参数化输入查询和输出命名
我有一个作为tOracleInput的视图和另一个用于输出的组件(为了简单起见,让day tOutputDelimited)talend-参数化输入查询和输出命名,talend,Talend,我有一个作为tOracleInput的视图和另一个用于输出的组件(为了简单起见,让day tOutputDelimited) 现在我想在tOracleInput中的一些字段中添加where子句以过滤数据。其思想是在jar执行期间将这些值作为参数传递,以过滤输出 此外,输出的文件名必须来自jar执行传递的第一个参数 任何人都可以告诉我如何实现1和2 提前感谢在您的工作中,创建两个键入的字符串,比如说out\u filename和where\u value 在tOracleInput组件的查询框中,
out\u filename
和where\u value
在tOracleInput
组件的查询框中,您可以像这样连接where值:
"select * from my_view where field" + context.where_value
"/home/user/" + context.out_filename
my_job_launcher.sh --context_param out_filename='output.txt' --context_param where_value='>7'
在toutputdimited
组件的“文件名”框中,可以使用如下上下文变量:
"select * from my_view where field" + context.where_value
"/home/user/" + context.out_filename
my_job_launcher.sh --context_param out_filename='output.txt' --context_param where_value='>7'
现在,您可以按如下方式在命令行中传递它们:
"select * from my_view where field" + context.where_value
"/home/user/" + context.out_filename
my_job_launcher.sh --context_param out_filename='output.txt' --context_param where_value='>7'
在作业中,创建两个键入的字符串,例如out\u filename
和where\u value
在tOracleInput
组件的查询框中,您可以像这样连接where值:
"select * from my_view where field" + context.where_value
"/home/user/" + context.out_filename
my_job_launcher.sh --context_param out_filename='output.txt' --context_param where_value='>7'
在toutputdimited
组件的“文件名”框中,可以使用如下上下文变量:
"select * from my_view where field" + context.where_value
"/home/user/" + context.out_filename
my_job_launcher.sh --context_param out_filename='output.txt' --context_param where_value='>7'
现在,您可以按如下方式在命令行中传递它们:
"select * from my_view where field" + context.where_value
"/home/user/" + context.out_filename
my_job_launcher.sh --context_param out_filename='output.txt' --context_param where_value='>7'
如果文件名来自数据库列值,该怎么办?谢谢,如果文件名来自数据库列值呢?谢谢