通過右鍵添加link
鼠標右鍵點擊起始stage,按住右鍵移動鼠標到目標stage。還有一種方法就是把鼠標放在起始stage的邊緣等到變為一個小圓圈里面有一個叉的時候拖動鼠標到目標stage。
DataStage中默認和隱式類型轉換時注意的問題
當從源向目標映射數據時,如果類型不一致,對于有些類型我們需要在modify或transfomer stage中通過函數進行轉換,對于有些系統會自動完成類型轉換,在類型轉換過程中,注意以下幾點:
1 在變長到固定長度字符串的默認轉換中,parallel jobs用空格(ASCII 20)字符來填充剩余長度。聯系到前面做的一個parallel job,當目標是變長時(當時源也是變長,但是好像源的精度要小些),但是字符串實際的長度沒有指定的變長那么長的話,系統會自動用空格(ASCII 20)來填充(具體在哪個stage填充的不知),而且環境變量APT_STRING_PADCHAR的默認值也是空格(ASCII 20)。
2 通過環境變量APT_STRING_PADCHAR可以改變默認的填充字符null(ASCII 0),同時一般還要加上trim就能解決空格問題,此問題非常普遍。
3 有個PadString 函數可以用來用指定的字符來填充一個變長的字符串到指定的長度。這個函數的參數不能使固定長度字符串,如果是固定長度的先轉化為變長。
Copy Stage作為占位符
在job開發中,當你暫時不知道該使用哪個stage時,可以使用copy stage作為占位符,注意不要把Force屬性設為True,在不把Force設為True時,復制將在運行時進行優化。
使用Schema file來指定meta data
1 可以通過列定義和schema file兩種方式來指定meta data,值得注意的一點是Note that, if you use a schema file, you should ensure that runtime column propagation is turned on. Otherwise the column definitions specified in the stage editor will always override any schema file.即,如果想通過schema file來指定meta data,必須勾上runtime column propagation,否則總是使用列定義來作為meta data。
2 If you are using a schema file on an NLS system, the schema file needs to be in UTF-8 format.如果你的datastage使用了NLS system,那么schema file必須是UTF-8格式的。文檔中說可以使用Sequential stage來完成轉碼。
通過Server Shared Container在Parallel Job中添加Server Job Stage
You create a new shared container in the DataStage Designer, add Server job stages as required, and then add the Server Shared Container to your Parallel job and connect it to the Parallel stages.在Designer中創建一個server shared container,添加需要的Server job stage,再把server shared container添加到parallel job并連接到其他parallel stage。
幾個環境變量的具體路徑
%SERVERENGINE% – DataStage engine account directory(normally C:\Ascential\DataStage\Engine on Windows and <dsadminhome>\Ascential\DataStage\DSEngine on UNIX).
%PROJECT% – Current project directory.
%SYSTEM% – System directory on Windows NT or /usr/lib on UNIX.
一句不太懂的話,先做記錄
If NLS is enabled, avoid using the built-in Iconv and Oconv functions to map data unless you fully understand the consequences of your actions.在使用了NLS時,盡量避免使用Iconv and Oconv來映射日期,因為可能產生一些意想不到的結果。