Suppose a manufacturer informs you about the categories of products that will no longer be available. You don't want to have in your database products something that you will not sell. Then you use PDI to delete them.
From the Packt website, download the
LUX_discontinued.txt
file.Create a new transformation.
With a Text file input step, read the file.
Preview the file. You will see the following:
After the Text file input step, add an Add constants step to add a
String
constant namedman_code
with valueLUX
.Expand the Output category of steps and drag a Delete step to the canvas.
Create a hop from the Add constants step to the Delete step.
Double-click the Delete step. Select
js
as Connection and, as Target table, browse and select products. In the grid add the conditionsman_code = man_code
andpro_theme LIKE category
. After the Delete step, add a Write to log step.Right-click the Delete step and define the error handling just like you...