display-medicalUpdate DB table

Update employees in the EMPLOYEES table using the Update step.

circle-exclamation

Workshop - Update DB table


circle-info

Workshop files

Create a file named employees_update.txt. Save it in the same folder as your transformation.

This workshop assumes a comma-delimited file with no header row:

1002,Murphy,Diane,x5800,[email protected],1,1000,CEO
1102,Bondur,Gerard,x5408,[email protected],4,1056,Regional Sales Manager (EMEA)

Update employees
circle-info

Create a new transformation

Use any of these options to open a new transformation tab:

  • Select File > New > Transformation

  • Use Ctrl+N (Windows/Linux) or Cmd+N (macOS)


circle-info

Text file input

Read the incoming updates from employees_update.txt.

  1. Start Spoon.

circle-info
  1. Drag Text file input onto the canvas.

  2. Open the step properties.

  3. Configure the file path:

    • File: ${Internal.Transformation.Filename.Directory}/employees_update.txt

Set file path
circle-info

If ${Internal.Transformation.Filename.Directory} is empty, save the transformation first.

  1. Select Content. Use the same delimiter settings as the screenshot.

Text file input - Content
  1. Select Get Fields.

  2. On Fields, confirm you have these stream fields:

    • EMPLOYEE_NUMBER

    • LASTNAME

    • FIRSTNAME

    • EXTENSION

    • EMAIL

    • OFFICECODE

    • REPORTSTO

    • JOBTITLE

Text file input - Fields
  1. Optional: select Preview. Confirm you get 2 rows.

  2. Select OK.

circle-check
chevron-rightTroubleshootinghashtag

Step updates 0 rows Confirm EMPLOYEENUMBER exists in EMPLOYEES. The Update step does not insert.

Updates fail with data type errors Make sure EMPLOYEE_NUMBER is numeric. Use Select values to cast if needed.

Wrong rows updated Confirm the key mapping is EMPLOYEENUMBER (table) = EMPLOYEE_NUMBER (stream).

Last updated

Was this helpful?