Data Cleansing
Traditional data cleansing techiques ..
CustomerID FirstName LastName Email Phone BirthDate Address
1 John Doe john.doe@email.com 555-123-4567 1985-03-15 123 Main St, City, CA, 12345
2 Jane Smith jane.smith@email.com (555) 987-6543 03/22/1990 456 Elm Avenue, Town, AZ, 67890
3 John Doe johnd@email.com 5551234567 1985-03-15 123 Main Street, City, CO, 12345
4 Alice Johnson alice.j@email.com 555-555-5555 1988-12-01 789 Oak Rd, Village, State, 54321
5 Bob Williams bob.w@email.com 1975-07-30 101 Pine Lane, Hamlet, State, 13579
6 Emma Brown emma.brown@email.com (555)246-8135 05-19-1992 202 Cedar Blvd, Borough, NY, 24680
7 Alice Johnson alice.johnson@email.com 555.555.5555 12/01/1988 789 Oak Road, Village, FL, 54321
8 Charlie Davis charlie.d@email.com 555-369-2587 303 Maple Dr, City, State, 97531
9 Taylor d.taylor@email.com 555-159-7532 1982-09-25 404 Birch St, Town, State, 86420
10 Grace Lee grace.lee@email.com 5557894561 11-11-1995 505 Walnut Ave, City, State,
...Log on to Portainer and check the MariaDB database container is up and running.
Execute the following script to create a sourceDB & targetDB databases.
'grant all' to pentaho_user & pentaho_admin with the password: 'password'.

Transformation

Drag and drop a CSV File input onto the canvas.
Double-click to configure the following settings:

Increase the varchar (length) to prevent truncation.
After clicking on 'Get Fields', 'Preview' the data.

Define Database Connection (MariaDB)
In Spoon, click File > New > Transformation. Any one of these actions opens a new Transformation tab for you to begin designing your transformation:
By clicking New, then Transformation
By using the CTRL-N hot key
From within Spoon, Select:
File > New > Database Connection The Database Connection dialog box appears.

Enter the following details:
Connection Name
MariaDB: sourceDB
Connection Type
MySQL
Host Name
localhost
Database Name
sourceDB
User name
pentaho_admin
Password
password
Click Test.
Configure the Table ouput step with the following settings:

Click on the SQL button & Execute.

Close all the windows & save / RUN transformation.

Check the table has been created and populated with customer data.

x
x
x

If field value is null

Filter FN

Stream lookup FN

Select values FN

x
x
x
x
Last updated
Was this helpful?
