The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
Add Prefix or Suffix to attribute names in joined dataset?
Hi. I am joining 2 datasets into a single dataset. As each dataset has many attributes with odd names, I would like to distinguish in my final joined dataset the source of each attribute. I would like to add a prefix onto the attribute names in my final joined dataset identifying the original source of the attribute (for example, datasetA_att1, datasetB_att2, and so on).
Is there a way to do this without having to rename each individual attribute? My final joined datsaset has over 2000 attributes.
Thanks in advance for any advice-
Tim
Is there a way to do this without having to rename each individual attribute? My final joined datsaset has over 2000 attributes.
Thanks in advance for any advice-
Tim
0
Answers
This is very doable. You can use the Rename by Replacing operators pre-join for both datasets.
attribute filter type = all (default anyway)
replace what = (.*.)
replace by = $1_set1 or $1_set2
- The $1 takes everything that is captured in the parens in replace what.
- .*. this is regular expression that says any character (.) any length (*)