Can not create join: All sheets of 'JoinPair{parsedata![dma_name]<=>work_MultiZipCode_GetMultiZC![DMA]}' do exist in previous pairs
Hi,
Can you kindly explain what this error means? I am trying to create a joined sheet. Similar posts do not reveal an answer, unfortunately.
Thank you in advance!
-
Hello Sharon.
This exception might occur if one tried to use join dialog incorrectly.When one wants to join
Sheet1
andSheet2
, it uses a simple TWO_MEMBER_JOIN. Here is a JSON definition of this operation.sheetDefinition: { joinCategory: "TWO_MEMBER_JOIN", joinPairs: [ { joinType: "OUTER_LEFT", sheet1: "Sheet1", sheet2: "Sheet2", joinColumns1: [ "B" ], joinColumns2: [ "B"
When there is a need to join
Sheet1
andSheet2
on more than one column, it would be the same TWO_MEMBER_JOIN, but with more join columns.sheetDefinition: { joinCategory: "TWO_MEMBER_JOIN", joinPairs: [ { joinType: "OUTER_LEFT", sheet1: "Sheet1", sheet2: "Sheet2", joinColumns1: [ "B", "C" ], joinColumns2: [ "B", "C"
If it is required to join more than one Sheet, one should use MULTI_JOIN. So if its needed to join
Sheet1
,Sheet2
andSheet3
, at the first step, one should joinSheet1
andSheet2
, then at the second step, joinSheet2
andSheet3
.sheetDefinition: { joinCategory: "MULTI_JOIN", joinPairs: [ { joinType: "OUTER_LEFT", sheet1: "Sheet1", sheet2: "Sheet2", joinColumns1: [ "B" ], joinColumns2: [ "B" ] }, { joinType: "OUTER_LEFT", sheet1: "Sheet2", sheet2: "Sheet3", joinColumns1: [ "C" ], joinColumns2: [ "C" ]
For example, if you will try to use MULTI_JOIN to join
Sheet1
andSheet1
twice, you will getAll sheets of JoinPair do exist in previous pairs
exception. In this case, you should use TWO_MEMBER_JOIN with two joinColumns. -
Thank you, Konsta.I am only using the file -> Join option and yes, trying to select multiple columns. I suppose this is the equivalent of your explanation of using a MULTI_JOIN to join
Sheet1
andSheet1
twice, you will getAll sheets of JoinPair do exist in previous pairs
exception.If in this case a TWO_MEMBER_JOIN should be used, and file -> join does not give this option, then where is this specified? I am new to datameer and have not yet seen where to specify a coded version of a join.
Thank you,
Sharon
-
Just as an aside, the documentation does state to use a multi join with multiple columns but does not state anything about a TWO_MEMBER_JOIN. Can you please advise?
Thanks again,
Sharon
Creating a Join From Multiple Columns
Creating a multi join or multi-key join is easy with Datameer. With the multi-key join, you can specify multiple columns from two different worksheets and join the data together.
Please sign in to leave a comment.
Comments
5 comments