Delete DB table

Delete rows from STG_SALES_DATA using transformation-driven criteria.

Workshop - Delete DB table


Workshop files

Create a file named productlines.csv. Save it in the same folder as your transformation.

This workshop assumes a single-column file with no header row:

Classic Cars
Motorcycles
Planes
Ships
Trains
Trucks and Buses
Vintage Cars
30KB
Open

Delete

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)


Inspect the data

Inspect STG_SALES_DATA before you delete. You need a baseline to validate the change.

  1. In your database tool, view STG_SALES_DATA.

STG_SALES_DATA

You will filter deletes using PRODUCTLINE and QUANTITYORDERED.

  1. Run a quick check for high-quantity rows:

STG_SALES_DATA constraint QUANTITYORDERED > 50
Troubleshooting

Nothing was deleted Your criteria did not match any rows. Confirm your comparator and data types.

Too many rows deleted Your comparator is too broad, or you mapped the wrong field names.

Delete step fails with type conversion errors Cast min_quantityordered to a number with Select values.

Last updated

Was this helpful?