目次

Search

  1. はじめに
  2. トランスフォーメーションに関する作業
  3. アグリゲータトランスフォーメーション
  4. カスタムトランスフォーメーション
  5. カスタムトランスフォーメーション関数
  6. データマスキングトランスフォーメーション
  7. データマスキングの例
  8. 式トランスフォーメーション
  9. エクスターナルプロシージャトランスフォーメーション
  10. フィルタトランスフォーメーション
  11. HTTPトランスフォーメーション
  12. ID解決トランスフォーメーション
  13. Javaトランスフォーメーション
  14. JavaトランスフォーメーションAPIのリファレンス
  15. Java式
  16. Javaトランスフォーメーションの例
  17. ジョイナトランスフォーメーション
  18. ルックアップトランスフォーメーション
  19. ルックアップキャッシュ
  20. 動的ルックアップキャッシュ
  21. ノーマライザトランスフォーメーション
  22. ランクトランスフォーメーション
  23. ルータトランスフォーメーション
  24. シーケンスジェネレータトランスフォーメーション
  25. ソータトランスフォーメーション
  26. ソース修飾子トランスフォーメーション
  27. SQLトランスフォーメーション
  28. マッピングにおけるSQLトランスフォーメーションの使用
  29. ストアドプロシージャトランスフォーメーション
  30. トランザクション制御トランスフォーメーション
  31. 共有体トランスフォーメーション
  32. 構造化されていないデータのトランスフォーメーション
  33. アップデートストラテジトランスフォーメーション
  34. XMLトランスフォーメーション

トランスフォーメーションガイド

トランスフォーメーションガイド

[入力行に達したとき]タブ

[入力行に達したとき]タブ

Javaトランスフォーメーションは、入力行を受け取ると[入力行に達したとき]タブでJavaコードを実行します。この例では、トランスフォーメーションによって出力行を生成することについての可能性が入力行の値に基づいて決定されます。
[入力行に達したとき]タブで、以下のコードを入力します。
// Initially set generateRow to true for each input row. generateRow = true; // Initially set isRoot to false for each input row. isRoot = false; // Check if input employee id and name is null. if (isNull ("EMP_ID_INP") || isNull ("EMP_NAME_INP")) {      incrementErrorCount(1);      // If input employee id and/or name is null, don't generate a output      // row for this input row.      generateRow = false; } else {      // Set the output port values.      EMP_ID_OUT = EMP_ID_INP;      EMP_NAME_OUT = EMP_NAME_INP; } if (isNull ("EMP_DESC_INP")) {      setNull("EMP_DESC_OUT"); } else {      EMP_DESC_OUT = EMP_DESC_INP; } boolean isParentEmpIdNull = isNull("EMP_PARENT_EMPID"); if(isParentEmpIdNull) {      // This employee is the root for the hierarchy.      isRoot = true;      logInfo("This is the root for this hierarchy.");      setNull("EMP_PARENT_EMPNAME"); } synchronized(lock) {      // If the employee is not the root for this hierarchy, get the      // corresponding parent id.      if(!isParentEmpIdNull)           EMP_PARENT_EMPNAME = (String) (empMap.get(new Integer (EMP_PARENT_EMPID)));      // Add employee to the map for future reference.      empMap.put (new Integer(EMP_ID_INP), EMP_NAME_INP); } // Generate row if generateRow is true. if(generateRow)      generateRow();