0
我有一個視圖作爲tOracleInput和另一個輸出組件(讓天tOutputDelimited爲簡單起見)。talend - 參數化的tOracleInput查詢和輸出的命名
現在我想添加一個where子句到我的tOracleInput中的一些字段來過濾數據。這個想法是在jar執行期間將這些值作爲參數傳遞以過濾輸出。
此外,輸出的文件名必須來自jar執行傳遞的第一個參數。
任何人都可以見識一下如何實現提前
我有一個視圖作爲tOracleInput和另一個輸出組件(讓天tOutputDelimited爲簡單起見)。talend - 參數化的tOracleInput查詢和輸出的命名
現在我想添加一個where子句到我的tOracleInput中的一些字段來過濾數據。這個想法是在jar執行期間將這些值作爲參數傳遞以過濾輸出。
此外,輸出的文件名必須來自jar執行傳遞的第一個參數。
任何人都可以見識一下如何實現提前
在你的工作1個& 2.
謝謝,創建2 context variables類型的字符串,讓說out_filename
和where_value
。
在tOracleInput
分量,在查詢框,您可以連接在其中value是這樣的:
"select * from my_view where field" + context.where_value
在tOutputDelimited
組件,在文件名框中,您可以使用上下文變量是這樣的:
"/home/user/" + context.out_filename
現在你可以像這樣把它們放入行命令:
my_job_launcher.sh --context_param out_filename='output.txt' --context_param where_value='>7'
如果文件名來自數據庫列值,那麼該怎麼辦?謝謝http://stackoverflow.com/questions/42666094/talend-filename-of-output-from-a-column-value – lorraine