In the dataset included, I am trying to accomplish the following:
Under Column named “Account Attributes” I have rows with full account numbers that contain 8 characters. The first step I need to accomplish is to have 4 characters only those. For those that get converted to 4 characters, I need to also add a prefix “F” before the numbers. It will look like this “F6681”
Tried different approached under column expressions and adding constant columns and then combining but was not being successful.
In this case I would evaluate if the account attribute consists of 8 chars. If so, concatenate “F” + the first 4 characters of the account attribute. If not, retain the account attribute.
If you want a more qualitative analysis of the account attribute, you could opt for a RegexMatcher. For example, if you only want to manipulate the attribute if the last 4 digits are zero, you could use something like: