将SQL结果分配给DataStage中的Job参数 [英] Assigning an SQL result to a Job Parameter in DataStage

查看:187
本文介绍了将SQL结果分配给DataStage中的Job参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚开始使用Datastage(版本11.5),并且尝试将简单SQL查询的值(从Table中选择max(date_col))分配给Job Parameter,以便可以将其用作文件的一部分由工作产生的.

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.

任何人都可以指出一种简单的方法,因为我不知道如何在参数值中包含SQL查询.

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

先谢谢了.

推荐答案

有一些选项可以做到这一点.我推荐的是:

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

  • 将查询结果写入顺序文件
  • 使用执行命令"阶段(按顺序)来读取文件
  • 在以下作业活动"阶段之一中使用它(作为作业参数)

另一种选择是将参数集与值文件一起使用.这些值文件是OS中的实际文件,并且它们的结构很简单,因此可以由DataStage作业编写.在这种情况下,它不能用于序列中的条件.

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.

这篇关于将SQL结果分配给DataStage中的Job参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆