0

I am very new in Pentaho Data Integration and need your help.

I need to compare two database tables, which have a diffrerent amount of columns. For example, firts table A has 3 columns (date, city, country) and other table B has 5 columns (date, city, country, street, postcode). Do you know the step, where I can compare these two tables and move differences (I mean columns „street“ and „postcode“) into the first table (A)? Thank you for your help.

Jane
  • 23
  • 2
  • 5
  • If you are talking about syncing metadata rather than just data, you might look at the `Metadata structure of stream` step. I haven't used it myself, but it looks like it could determine if the metadata was different. There is no tool to directly sync metadata. You could flow the output of the above step to a `Merge rows (diff)` step and find what columns are missing and create `Alter Table` commands to add them, but it won't handle column deletes. You might be better off with straight SQL. – Brian.D.Myers Oct 13 '16 at 16:26

1 Answers1

0

For this you need to first use right join and then have a select fields steps where you only select the table a(3 columsn) and then table b(2) columns rest you can delete.

IAmHomes
  • 513
  • 2
  • 11
  • 20