Table of Contents

Search

  1. Preface
  2. Introduction
  3. Dashboard
  4. Resources
  5. Workflows
  6. Task Reference
  7. Services Overview
  8. Users
  9. Logs and Reports
  10. Encryption
  11. System
  12. Appendix
  13. Glossary Terms

Example 3: Modify RowSet Using New Columns with a SQL Task

Example 3: Modify RowSet Using New Columns with a SQL Task

In this example, an SQL query creates a RowSet variable named myData with 6 columns of data. The following graphic illustrates the data contained in the RowSet:
Example data:
${myData} RowSet Variable
${myData[1]}
${myData[2]}
${myData[3]}
${myData[4]}
${myData[5]}
${myData[6]}
34594
Heather
Banks
1998-01-19
BB001
72000
34593
Tina
Young
2010-04-01
BB001
65000
34590
Kathy
Harris
2007-09-30
KH001
105000
34592
Mark
Walker
2012-11-15
KH001
87500
34591
John
Davis
2001-06-15
KH001
85000
The Modify RowSet task will be used to create a new RowSet variable that only contains columns 1,3, and 6 from the original RowSet. Follow the steps below to use the data from the original RowSet, create columns and specify their value, and then output the results to a new RowSet.
Before adding a Modify RowSet task, you must have an Output RowSet variable from another task. The Output RowSet variable is used as the Input RowSet variable on the Modify RowSet task.
  1. From within the Project Designer page, expand the Data Translation folder in the Component Library, and then drag the Modify RowSet task to the Project Outline.
  2. On the Basic tab of the Modify RowSet task, specify the following values:
    Input RowSet Variable
    Specify the name of a variable of type RowSet which contains the data to modify. For example, ${myData}.
    Output RowSet Variable
    Specify the name of the variable that will contain the modified data. This will be a variable type of RowSet. If this variable exists it will be overwritten, otherwise it will be created.
    Start With Existing Columns
    Choose if you want to start with all columns from the input RowSet (true) or would rather specify which columns you want specifically (false). Choose false.
  3. In the Modify RowSet task window, from the
    Add
    button in the sub-menu, click
    Add New Column
    .
  4. Specify the Index where the new column will be added, and the column value that will be written to the Output RowSet variable. In the example, a new column will be created at Index 1 and will contain the value of column 1 from input RowSet variable.
  5. In the Modify RowSet task window, from the
    Add
    button in the sub-menu, click
    Add New Column
    .
  6. Specify the Index where the new column will be added, and the column value that will be written to the Output RowSet variable. In the example, a new column will be created at Index 2 and will contain the value of column 3 from input RowSet variable.
  7. In the Modify RowSet task window, from the
    Add
    button in the sub-menu, click
    Add New Column
    .
  8. Specify the Index where the new column will be added, and the column value that will be written to the Output RowSet variable. In the example, a new column will be created at Index 3 and will contain the value of column 6 from input RowSet variable.
  9. Click the
    Save
    button when finished.
  10. The modifiedData RowSet variable will contain 3 columns.
Example Output RowSet Data:
${modifiedData} RowSet Variable
${modifiedData[1]}
${modifiedData[2]}
${modifiedData[3]}
34594
Banks
72000
34593
Young
65000
34590
Harris
105000
34592
Walker
87500
34591
Davis
85000

0 COMMENTS

We’d like to hear from you!