简体   繁体   中英

How can I make an Excel input in Pentaho Kettle with complex headers?

I have several Excel Model files like this:

| Name | Age | Class | Jump |        Swim         |         Run         | sex |
|      |     |       |      | 100m | 500m | 1000m | 100m | 200m | 1000m |     |
-------------------------------------------------------------------------------
| Jim  |     |       |      |      |      |       |      |      |       |     |
-------------------------------------------------------------------------------
| Tom  |     |       |      |      |      |       |      |      |       |     |
......

(Just a example,there is no other meanings,the real file is much more complex)

Now i have to take the data and save them into database.What shall i do with the spoon? When i create a Excel Input it cannot recognize all the column titles and cannot find subtitle.

What shall i do with the spoon? if Kettle cannot complete this task,is there any other tools that can finish it?(Java)

Have your thought / or made a normalized relational data model for storing your data? Just moving a big complex data file from excel into one single table misses it's goal.

Separate table for the entity 'person' and another for 'sport_results' etc etc.

You can accomplish this by either:

In Excel adjust all the row header to a single row as in get rid of the subtitles and import the data in one way.

Name
Age
Class 
Jump
sex
run_100m
run_500m
run_1000m
swim_100m
swim_500m
swim_1000m

Or save the subtitled / sport result data in a separate excel file and use onther input step to import the different headers and merge the streams later

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM