Composite keys in Joiner

I am often joining tables based on composite keys. At the moment, I do this by using Column Combiner + RowID for the left table, and Column Combiner for the right table. One problem with this approach is that if the column orders are different between the tables, the composite key will be different. It’s something that can be checked, or resorted prior to creating the composite key, but that leads to more of what might be considered another problem: this can become a bit tedious. Would it be possible for the joiner to allow you to choose which of the common columns between the two tables should be used to build this composite key? Or maybe there is an easier approach?

Thanks in advance for your help,

Andrew

Hi Andrew,

Are you doing a many-to-many join?

Best regards,

Jay

Hi Jay,

I’m typically doing a one-to-many join. The left table has my values, which are unique for the key combination.

Hi,

Interesting issue, perhaps the column combiner node could combine the fields in thd order in which they are added and not hte original table column order? In the interim there is a coumn reordering node.

Hope that helps.

Jay

Hi Jay,

As far as I can tell, the column order in the combiner is set by the original column order and there is no way to alter it. I am doing as you suggest with the reordering node. Having the Joiner able handle composite keys would be a nice feature for a future release of KNIME, I’m sure I’m not the only one doing this sort of thing.

Thanks,

Andrew

Hi Andrew,

I agree with you that the functionality would clean things up a bit ,making them easier. I myself am another Knime user so I’m not actually with Knime. Thankfully things like this can be accomplished with other compoents which exist. The Knime team has created a great peice of open source software.

I was attracted to Knime for it’s ability to handle larger datasets but I see there is a trend of making use of knime for the nice workflow gui interface as well. There was a presentation at the recent UseR! conference and I’ve seen a few papers as well.

If I can ask what type of work are you doing with Knime? I work in financial services as an analyst dealing with sales/marketing/product work.

Best regards,

Jay

Hi Andrew,

I have had a similar problem.
I built an empty table with just the column names in it and I do a “Concatenate” with this empty table. This preserves the order of the columns as they are in the empty table. The empty table has to be on the top input to set the column order.
Does this help?

– Rosaria

Hi Jay,

Sorry for the incredibly long delay in replying. I went on summer vacation soon after that last msg and have only recently gotten back into the KNIME side of things. I work for a company that does genome-wide, cell-based assays. While I can code a lot of the things KNIME does in scripts, we’re looking for ways to make our scientists more independent in how they handle data. KNIME seems to have the right tradeoff between user-friendliness and power to make this possible.

Best regards,

Andrew

Thanks, Rosaria, I will give this a try.