Update DB

The Update step first looks up a row in a table using one or more lookup keys. If it can be found and the fields to update are all the same, no action is taken, otherwise the record is updated.

In this guided Lab, you will:

• Update the Employees Table.

1002, Murphy, Diana,x5800,dmurphy@classicmodelcars.com,1,1000,CEO

1102, Bondur, Gerard,x5408,athompson@classicmodelcars.com,4,1056,Regional Sales Manager (EMEA)

To create a new transformation

  1. In Spoon, click File > New > Transformation.

Any one of these actions opens a new Transformation tab for you to begin designing your transformation.

  • By clicking New, then Transformation

  • By using the CTRL-N hot key

The Text File Input step is used to read data from a variety of different text-file types. The most commonly used formats include Comma Separated Values (CSV files) generated by spreadsheets and fixed width flat files.

The Text File Input step provides you with the ability to specify a list of files to read, or a list of directories with wild cards in the form of regular expressions. In addition, you can accept filenames from a previous step making filename handling more even more generic.

  1. Drag the Text File Input step onto the canvas.

  2. Open the Text File properties dialog box.

  3. Ensure the following details are configured, as outlined below:

Because the sample file is located in the same directory where the transformation resides, a good approach to naming the file in a way that is location independent is to use a system variable to parameterize the directory name where the file is located. In our case, the complete filename is:

${Internal.Transformation.Filename.Directory}/employees_update.txt

  1. Click on the ‘Content’ tab and configure the following properties:

  1. Click on ‘Get Fields’ button.

Click on the ‘Fields’ tab and notice the following properties:

  1. Close the step.

Last updated