cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
0 Kudos

Allow Update platform to create new columns if they already exist in the table to be updated

What inspired this wish list request? 

Using JMP's Update platform and getting error messages.

 

 

What is the improvement you would like to see? 

If user has defined columns to be added and chose NOT to replace any of those added columns, add them as new columns with index.

 

Error:

 

Names Default To Here(1);

dt1 = Open("$SAMPLE_DATA/Big Class.jmp", Invisible);
dt2 = Open("$SAMPLE_DATA/Big Class Families.jmp", Invisible);

dt1 << Update(
	With(dt2),
	Match Columns(:name = :name),
	Add Columns from Update Table(:age),
	Replace Columns in Main Table(None)
);

Close(dt1, no save);
Close(dt2, no save);

but I would like to end up with two age columns: original age and newly created age 2 from the dt2.

 

 

 

Why is this idea important? 

Makes using Update more flexible without having to rely on renaming columns

 

 

9 Comments
Status changed to: Acknowledged
 
hogi
Level XII

you could use Tables/Join instead of Tables/Update.

 

Join provides an option to choose between merging columns and keeping both columns.

Status changed to: Yes, Stay Tuned!

Hello! This will be available in JMP 19, except instead of indexing to differentiate the added column, it will state the name of the source table in parentheses. For example, age (Big Class Families).

hogi
Level XII

nice!

hogi
Level XII

On the other and, I guess that some users used the default setting

hogi_0-1753216127195.png

 

as:
- add new columns

- skip existing columns

 

with the new functionality, JMP will always add duplicate columns.
Might collide with some user defined scripts ...

How about just adding the new columns when the user explicitly selects the columns?

hogi_1-1753216199655.png


-> better overlap with the existing functionality.
+ 100% of the new functionality.

jthi
Super User

This is what the wish was for, and we can hope it is the way it will be implemented.

 

If user has defined columns to be added and chose NOT to replace any of those added columns, add them as new columns with index.

hogi
Level XII

Hm.

 

Ineed, replace any of those: prevents the new mode.
For the individual column everything looks like expected:
add it if the user wants it  - replace overrules add:

hogi_0-1753246199736.png

 

The issue is with the batch - comfort mode:
"add all the new columns" - and replace none (or just a few):

hogi_0-1753245017114.png

["default setting" was the wrong wording, default Add setting]

 

How to adjust the settings in the future to get the previous behavior of  "add any non-existing column - skip the existing ones"

- don't destroy existing columns by replacing them

- don't add duplicates of existing columns

Thank you for sharing your thoughts on this feature! If you're participating in the Early Adopter (EA) program, we encourage you to try out the feature and share your feedback through the program channels.

hogi
Level XII

OK. I sent the comment in addition via email.

 

Actually @jthi might comment if he insists in the implemented functionality or if he is ok with the new proposal.

Maybe, if another user uses Tables/update and finds this post he/she might comment as well ...

 

New Proposal:

- if columns are "selected" to be added, and they already exist -> added with a postfix.

hogi_0-1753300310058.png

- for the batch-add mode:

hogi_1-1753300347739.png

columns are just added if they are missing. No postfix will be added.
[to guarantee compatibility with the previous batch-add-behavior.]