How to rename Columns based on a dynamic column split

I am importing a single column from Airtable that has a number of comma-separated values in each row. I am using the column split step to separate these values.

The step dutifully makes a set of columns with the names:
Column Name
Column Name (1)
Column Name (2)
and so on until it parses out all values.

If there were a fixed number of columns to create I would then go about renaming the columns as
Column Name 1
Column Name 2
Column Name 3

However, I have a variable number of columns to deal with and often I could have up to 50 new columns in some instance; the rename step doesn’t really work here.

Is there a way to get the Column Split step to create the columns in a specific way as above?
Is there a way to rename a dynamically generated set of columns easily?

Thanks so much for your advice.

Hey Ian!

I’ve certainly hit this before. The short is that the column rename only works for static renaming. To do something more dynamic, you will need to flip your table.

Use a Table Flip to turn your column headers into a single column. And then you can target that column and use a Find/Replace step to rename things more dynamically.

Then when you are done, you can use another Table Flip to get it back to the proper orientation. Keep in mind that the left-most column will be the one used by the table flip to create the headers.

1 Like

Thanks @brian - that worked perfectly (albeit with a few steps in between.)

1 Like