🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

Add Prefix or Suffix to attribute names in joined dataset?

User: "tmyers"
New Altair Community Member
Updated by Jocelyn
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

Find more posts tagged with

Sort by:
1 - 3 of 31
    User: "mikeyharms"
    New Altair Community Member
    Hi Tim,

    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 (*)
    User: "tmyers"
    New Altair Community Member
    OP
    Mikey, you're the best, works perfectly. Thank you so much!
    User: "mikeyharms"
    New Altair Community Member
    Glad it helped.