Dynamic Column Naming

I don't know if anyone has had any luck with dynamic column naming. if so please assist with your methods. I know there is the rename with lookup action. But this requires an existing table with the desired new column name to already exist.

Here is an example use case. Every two weeks I receive a forecast file which contains the current fiscal half's quarter data. Either Q1 and Q2, or Q3 and Q4. Both quarters exist in the same file and I have to split them out by the quarter and do aggregates and then compare the aggregates to the outcome of the previous file's output. regardless of the quarter, the sales figure column name is going to be the same. So I have hard code the reference to the specific quarter. And this will require me to touch the Easymorph process each time we switch to a new half.

I am wondering if maybe there could be a rename by lookup based on another column value for the record? Or if anyone has any other solutions, I am absolutely all ears.

Additionally, something like this might be useful for folks using SAP datasets and have to move between renaming in different languages. SAP's backend uses German words and acronym looking column name like KUNNR etc. I would like to have a lookup table so I could take the base SAP column name and map a column output rename in English and Japanese. Otherwise, we start getting into translation and naming convention differences between the two target languages. Sorry this item is a bit of a tangent I have gone off on.

What I am sort of thinking about for the rename would work/look something like the below. But I would really welcome any potential solutions given Easymorph's current functionality.

Hi @Perk and welcome to the Community!

You can construct a name lookup table after the value of the [QT] column is known, and do renaming in a derived table. See the example below.

rename-columns.morph (3.6 KB)

Have a lookup table either in an external spreadsheet or hardcoded in EasyMorph using the "Create list" action. Then use the "Rename columns with lookup" action to rename German names to English or Japanese.

Thank you Dmitry! This should work beautifully!

Best-