Question

compare attributes of two different tables

  • 21 November 2013
  • 2 replies
  • 48 views

Badge +6
  • Contributor
  • 53 replies
I have two tables that are related through two attributes (Attribute A of table 1 and Attribute B of table 2). Now I would like set a new ID-Attribute (primary key) in table 1 and use this ID as the foreign key in table 2.

 

That means that I have to compare the attributes of the two tables and if attribute A of table 1 equals attribute B of table 2 then I write the ID-attribute of table 1 as FK to table 2.

 

I looked through the transformers but I couldn't find one where I was able two compare attributes of two different tables. But there sure is one...?!

 

 

Thanks in advance

 

Vera

2 replies

Userlevel 4
Badge +13
Hi,

 

 

The FeatureMerger can be used with multi keys to join on.

 

But in this case a single key (A and B), would do the job.

 

 

Itay
Badge +6
Thanks Itay.

 

It took me some time to sort things out, but finally I got it working.

 

 

Vera

Reply