For the complete documentation index, see llms.txt. This page is also available as Markdown.

Create DB table

Create tables ..

Workshop - Create DB table


Workshop files

Download the following files.

Keep the filenames unchanged.

Save them in your workshop folder.

504KB
Open
3KB
Open

Create databases

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)


Load Sales Data

Load sales data from a CSV file into STG_SALES_DATA.

Adjust field lengths to avoid truncation.

Load sales data

Follow the steps outlined below:

CSV File Input

Read a delimited file into a stream. Use Text File Input if you need more format options.

  1. Start Pentaho Data Integration.

Start Spoon

  1. Drag the CSV file input step onto the canvas.

  2. Open the CSV file input properties dialog box.

Configure these key fields:

  • Step name: csvi-sales_data

  • File name: ${Internal.Transformation.Filename.Directory}/sales_data.csv

  • Delimiter: , (comma)

  • Lazy conversion: clear

  • Header row present: select

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

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

CSV file input
  1. Click on the Get Fields button.

  2. Select OK.

Troubleshooting

“Table already exists” Disable table creation in Table Output, or drop the table first.

String truncation / data too long Increase field lengths in CSV File Input before you generate SQL.

SQL window is empty Select Get fields on the Database fields tab first.

Last updated

Was this helpful?