Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
stascher
Partner - Creator II
Partner - Creator II

Map ... Using; why doesn't this work?

Hello. 

I'm trying to mask the values in a field by reading the original set of values, creating replacement values based on record position and then employing Map Using to change the values whenever they're read in. Here is the code I'm trying to use, but I'm not seeing any changes in the data.  Any idea why?

Subject_List:
load distinct [Subjects.Subject] as Original_Subject,
'Subject_'&rowno() as Masked_Subject
from [lib://Subjects.qvd](qvd);


Subject_Mask:
mapping load Original_Subject, Masked_Subject resident Subject_List;

drop table Subject_List;

map [Subjects.Subject] using Subject_Mask;

Test:
Load [Subjects.Subject] from [lib://Subjects.qvd](qvd);

I would expect the values in Test to be 'Subject_x'.. but they're the original values. 

Thanks for any assistance. 

Labels (2)
1 Solution

Accepted Solutions
marcus_sommer

Try it with any kind of enforcing a processing of the data, for example with something like:

...
Test: Load [Subjects.Subject] from [lib://Subjects.qvd] (qvd) where 1=1;

- Marcus

View solution in original post

3 Replies
marcus_sommer

Try it with any kind of enforcing a processing of the data, for example with something like:

...
Test: Load [Subjects.Subject] from [lib://Subjects.qvd] (qvd) where 1=1;

- Marcus

stascher
Partner - Creator II
Partner - Creator II
Author

Wow that worked.  I never would have guessed that in a million years. You really are an MVP Marcus. 

 

Thank you.

marcus_sommer

Thanks. Beside the mapping-topic I think you could also use:

'Subject_'&autonumber([Subjects.Subject])

to simplify the task.

- Marcus