DHconsult
DHconsult

Reputation: 1

Pentaho Data Integration Field to Field Data Transformation

I am new to using Pentaho and looking to take some excel source data and map it to a .csv file. The field names in the source file and target file are different so I need to do some data mapping and maybe data manipulation.

1) How do I set up a field to field mapping in the tool? 2) What do I need to do to perform data manipulation at the field level?

Upvotes: 0

Views: 658

Answers (2)

NK0709
NK0709

Reputation: 66

step1. use Microsoft excel input step and map it to the excel file that holds headers and data points. note: 1.make sure you select right Spreadsheet type and sheet name 2.select Header checkbox in Content tab (this tells you have a header row in excel file)

step2. to concatenate fields you can use calculator using calculation type as A+B in which A will be First name and B as last name.( you can also add constant like a coma separation in full name like firstname,lastname )

step3. select text file output and choose relevant extension,separators,format and required fields that you need as output

run to see the results

Upvotes: 0

nsousa
nsousa

Reputation: 4544

Pentaho Data Integration has over 300 steps to perform data transformation. Suggesting a specific step without a precise requirement isn’t possible. What kind of manipulation are you trying to do? Clean up nulls? Concatenate strings? Change date formats? Filter based on regexp? Etc, etc. Take your time exploring the left hand side panel when editing a transformation and see what steps are available. Odds are, whatever you’re thinking of doing is implemented by at least one of them.

Re changing field names: you don’t need to keep the field names as they are in the excel file header. You can straight up give them the names you want. And on output you don’t have to keep the field order, you can switch them around at will.

Alternatively, you can use a Select Values step, and rename/reorder your fields to suit your needs.

Upvotes: 1

Related Questions