cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Choose Language Hide Translation Bar
Hegedus
Level IV

Join - This should be simple

OK.

DT1 has 1 column on interest named DUT#

DT2 has a variable number of columns.

I want to script a join that takes all the columns on DT2 and joins it with the single DUT# column in data table 1 by using Row numbers.

What is Select and selectwith expecting, a list, a string, .... "A pretty please"

How do I script this ?  The manual is completely worthless.

Current Data Table( CT );

ListofPads = CT << get column names;

CT1 = Data Table( CT ) << Join( With( Data Table( DUTTable ) ),select(ListofPads),selectwith(:DUT#), By Row Number);

1 ACCEPTED SOLUTION

Accepted Solutions
ms
Super User (Alumni) ms
Super User (Alumni)

Re: Join - This should be simple

Try to put the column list within Eval():

..., select(Eval(ListofPads)),...

View solution in original post

8 REPLIES 8
vince_faller
Super User (Alumni)

Re: Join - This should be simple

Let JMP make the script for you.  Just join the table and select source on the output table. 

Data Table( "Untitled" ) << Join(

  With( Data Table( "Untitled 2" ) ),

  By Row Number

)

Vince Faller - Predictum
Hegedus
Level IV

Re: Join - This should be simple

This approach does not work.

The script produced by JMP has specific column names and as such is not flexible to a different set of names or number of columns.

ms
Super User (Alumni) ms
Super User (Alumni)

Re: Join - This should be simple

Try to put the column list within Eval():

..., select(Eval(ListofPads)),...

Hegedus
Level IV

Re: Join - This should be simple

Thank you that worked.

Broader question, where in the documentation would it explain that that was necessary?

vince_faller
Super User (Alumni)

Re: Join - This should be simple

If DT1 only has 1 column and you're trying to join all the columns for DT2, why are you selecting columns?  My apologies, I must not have understood your question. 

Vince Faller - Predictum
Hegedus
Level IV

Re: Join - This should be simple

In JMP 11 you can't update by row position  so I would have to create and delete rows and in JMP 12 it deletes the data.  I reported the bug.

vince_faller
Super User (Alumni)

Re: Join - This should be simple

You're trying to update?

In Join you just have to change the matching specification.  (In JMP 11.2.1)

8439_3-27-2015 4-07-48 PM.png

Vince Faller - Predictum
chungwei
Staff (Retired)

Re: Join - This should be simple

You can use the key word "all" in place of the list of columns if you want to include all the columns from one table,

In the following example, I am joining Big Class to untitled 9 by row number.

I want to include only :Column 1 from untitled 9, and all the columns form Big Class.

Data Table( "Big Class" ) << Join(

  With( Data Table( "untitled 9" ) ),

  SelectWith( :Column 1 ),

  Select( all),

  By Row Number

)