Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Is there a way in the script to rename records based on values. i.e. in the field 'Type', I want any 1 to equal 'Private', 2 to equal 'General', etc.
Thank you!
The field is called 'Type of PII' and has values 1 through 5.
I want to assign the following:
1 = General PII
2 = Sensitive PII
3 = Financial Information
4 = Medical Information
5 = Multiple Types
Adapting my former post:
Use an ApplyMap function
First, load the table with the from/to columns
FromTo:
Mapping load * inline [
From, To
1,General PII
2,Sensitive PII
3,Financial Information
4,Medical Information
5,Multiple Types
...
...
];
Table:
Load
Field1,
Field2,
ApplyMap('FromTo', [Type of PII], 'Default Value') as [Type of PII],
...
...
From ...;
Eduardo
Thank you!
To be clear...I load this first in my script...
FromTo:
Mapping load * inline [
From, To
1,General PII
2,Sensitive PII
3,Financial Information
4,Medical Information
5,Multiple Types]
Then I load my table but where the [Type of PII] field would be, I put this instead?
ApplyMap('FromTo', [Type of PII], 'Default Value') as [Type of PII],
Exactly
I get the following error message when applying that logic...
Garbage after statement
FromTo:
Mapping load * inline [
From, To
1,General PII
2,Sensitive PII
3,Financial Information
4,Medical Information
5,Multiple Types]
Directory
Did you add semi-colon (;) after ] at the end?
FromTo:
Mapping
LOAD * Inline [
From, To
1,General PII
2,Sensitive PII
3,Financial Information
4,Medical Information
5,Multiple Types
];
It worked, thank you!
Awesome .
If you are satisfied, please close the thread by marking correct and/or helpful answers.
Best,
Sunny