Assigning an SQL result to a Job Parameter in DataStage

蹲街弑〆低调 提交于 2019-12-13 02:55:50

问题


I just started using Datastage (version 11.5) and I am trying to assign the value of a simple SQL query (select max(date_col) from Table) into a Job Parameter so that I can use it as a part of a file produced from the job.

Can anyone point out a simple approach to this, since I am rather lost on how to include SQL queries in parameter values.

Thanks in advance.


回答1:


There are some options to do this. The one I recommend is:

  • write the result of you query into a sequential file
  • Use a Execute Command stage (in a Sequence) to read the file
  • use it in one of the following Job Activity stages (as job parameter)

An alternative could be the use of Parameter Sets with value files. These value files are real files in the OS and their structure is simple so these could be written by the DataStage job. In this case it cannot be used for Conditions in the Sequence.



来源:https://stackoverflow.com/questions/45348780/assigning-an-sql-result-to-a-job-parameter-in-datastage

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!