cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Datasphere - Rename Columns in Batch or Add Prefix - for Join table with itself

axel_
Participant
0 Kudos

Hi Folks,

I need to join a table with itself as the records in the table itself are connected with each other.

Is there a way to attach a prefix to the column names or batch rename as data builder will complain in the join result about duplicate column names.

Manual rename is not really viable as we are talking about 500+ fields.

Best regards
Axel

Accepted Solutions (0)

Answers (5)

Answers (5)

tmeyer
Explorer
0 Kudos

You could download the object as a JSON file via the transport management and then change the names and upload it again?

axel_
Participant
0 Kudos

Hi Irvin,

using SQL view will work. If you now can tell me how to set the business name in the SQL view you will make my day!

Select "ID" as "VK_ID" from table1 will set technical name correctly to VK_ID but business name will stick to ID.

Best regards

Axel

irodin10
Explorer
0 Kudos

Sorry, I assumed you are talking about a SQL View, but it seems you are talking about a graphical view. For a graphical view I'm not aware of any easy way to do what you seem to be trying to do.

There are a few hard ways to achieve that (e.g. using the CLI or exporting and manipulating the underlying json object) but the easiest solution would be to switch to a SQL View (at least for this self-join part of your model).

axel_
Participant
0 Kudos

Hi Irvin,

can you elaborate on your suggestion a bit? Where to copy from? And then where to insert the modified result?

Or are you talking about creating an SQL view statement that doese the select and rename?

Thanks and best regards

Axel

irodin10
Explorer
0 Kudos

The easiest way would probably be to copy the fields into an excel sheet and use a formula to add a prefix of your choice.