kettle - How to get the reorder the column with csv input fixed column in pentaho -


scenario:

i have created transformation load data table csv file , have following columns in csv file:

  1. customer_id
  2. company_id
  3. employee_name

but user may give input file column ordering (random order)

  1. employee_name
  2. company_id
  3. customer_id

so, if try load file has random column ordering, kettle load correct column values per column names ... ?

using etl metadata injection can use transformation this, either normalize data, or store database:

metadata transformation

then need send correct data transformation. can read header line csv, , use row normaliser convert format used etl metadata injection.

i have included quick example here: csv_inject on dropbox, if make , run runs per csv file should work.


Comments

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -