Create DB table
Create tables ..
Workshop - Create DB tables
If you work with databases, one of the main objectives will be to extract, load and transform your data. Steel Wheels has several data sources that require loading into a database to discover, cleanse, conform, enrich and validate the data for reports.
In this guided Lab, you will:
Connect to a database
Create a database table
Configure: Table Input


Follow the steps outlined below:
Start Pentaho Data Integration.
Drag the CSV file input step onto the canvas.
Open the CSV file input properties dialog box.
Stepname
csvi-sales_data
Filename
${Internal.Entry.Current.Directory}\sales_data.csv
Delimiter
, (comma)
Lazy Conversion
unchecked
Header row present
checked
The CSV File input parses a sample number of records to set the metadata properties. As the Varchar is being mapped to a database table then you need to be careful to avoid truncation.
Ensure the following details are configured, as outlined below:

Click on the Get Fields button.
Click OK.
Drag the Table Output step onto the canvas.
Open the Table Output properties dialog box. Ensure the following details are configured, as outlined below:

Click on the Database fields.
Click on the ‘Get Fields’ button.

Ensure the mappings bewteen Table fields and Stream fields are correct.
Click on the SQL button.

Click Execute.
Click OK to Close all windows.
Click the Run button in the Canvas Toolbar.
Check that the table has been created in the sampledata database.


Follow the steps outlined below:
Drag the CSV file input step onto the canvas.
Open the CSV file input properties dialog box.
Ensure the following details are configured, as outlined below:



Drag the Table Output step onto the canvas.
Open the Table Output properties dialog box. Ensure the following details are configured, as outlined below:

Click on the Database fields.
Click on the ‘Get Fields’ button.

Click on the SQL button.

Click Execute.
Click OK to Close all windows.
Click the Run button in the Canvas Toolbar.
Check that the table has been created in the sampledata database.

Last updated
Was this helpful?
