Adding multiple columns at once

Hi everybody,

I don’t know if the option already exists, but I would like to see the following option in EDT. Adding multiple columns at once, instead of adding one column each time. Now I need to add 15 columns by performing an action 15 times. I think this could be easier.

1 Like

Do all the columns the same name and value? In that case you can use New Col once then Copy Cols to make 14 more copies.

If they are all different you need to use 15 New Col operations. I guess we allow you to specify 15 column names and values in a table. But I’m not sure that is much quicker than 15 New Col transforms.

Perhaps you can tell me a bit more about why you need to add these columns and what names and values they need to have.

1 Like

BTW this is already somewhere on the ‘wishlist’ for v2.

1 Like

I would also greatly appreciate a multiple new column transformation. I am taking spread sheets with fewer columns and different column names and transforming them into a standard format for upload. I need to add a large number of new columns to accomplish this.

Do these new columns have fixed values per column. Or are they derived from columns in the input?

A few have fixed values but the majority are blank. None are derived from the input columns.

If you have N blank columns to add:

  • create 1 blank column with New Col
  • make N-1 copies wth Copy Col
  • use Rename Cols to set the new col names.

Its not ideal, but it is probably better than doing N New Col transforms.

1 Like

Since the columns that are being added don’t have value and I take it they start with blank and later down the stream transforms updates them, then I think this could be fastest way and easy to do without adding multiple transforms.

Idea is, that whichever extra columns are needed, create them in Excel or any text editor in order you want them and then copy over to EDT and paste it as Clipboard and Stack it, then continue your transformation after stack and if you need to add other columns again down in the stream, then repeat the same process.

This way you will keep your transform clean as well by just having one Clipboard per extra columns, compare to number of New Cols or Copy Cols and then Rename transform.

Also with this you can always quickly swap out the names by simply re importing from the clipboard in the Clipboard transform.

image

3 Likes

Thanks, Anonymous, this is a great idea!

1 Like

Hi @simonj,

No need to delete your request.

Hi there,

i also have a very similar requriement, but as a newbie not sure on best / efficient option.

I need to add between 5-10 additional columns to my source data , and these columns will all have a set default value, (either true or false) and would then apply to all their respective rows (default value) , they are mandatory values and need to added to my file prior to uploading to a different system. The source extract doesnt have this data so i am filling gaps.

Any other ideas?

Here is the idea for you to carry out as per your requirement.

  1. Is your original data
  2. Is your fixed boolean data that need to be same for all the records, just add first column from your original data with the first row value this way you will be able to join the two on common Column.
  3. Use the Fill transform to fill rest of the empty cells for your fixed value columns.

Transform file.
FixedColumnValues.transform (2.6 KB)

1 Like