Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I just gave the mapping tables a unique name (vComp for example). Seems to work now.
See attached.
Regards,
Stefan
Have you tried to use the apply map after you have concatenated all of the tables via a resident load?
apply map reuires two seperate table like beelow
mapping load will hide the mapping table and show the table where you use apply map
tab1:
mapping
load *
from path;
Tab2:
Load
appymap(...) as a
from paath
so you can use the mapping load via resident table
it will hide your primary table
tab1:
mapping
load *
from path;
Tab2:
Load
appymap(...) as a
resident tab1
try this
XY_Map:
mapping load
'$(vComp)'&'-'&FIELD1 as ID,
FIELD1&'-'&FIELD2 as Desc;
select FIELD1, FIELD2 from SQL_TABLE;
load
...
applymap('XY_Map', $(vComp)&'-'&left(FIELD99,7),desc) as Desc,
...
select FIELD99 from SQL_FACT_TABLE;
Thanks, but I know that and I have two tables. As opposed to the standard school example I'm trying to concatenate two fileds into one I do not understand why it doesn't work.
Thx. I've tried this but am getting error that such field does not exist: Field not found - <Desc>
I have two tables (XY_Map and Fact) so there is no need for Resident.
Hi,
In your original post, you are using a variable '$(vComp)'. What does this variable store? Have you checked that the variable works fine and that the final table (not using the MAPPING prefix) returns the expected values? Are they numeric or literal? If it's a literal (a string) did you try using the Text() function to enclose the whole expression in both the mapping table and the parameter passed to the ApplyMap() function?
Can you post some sample application so we can check further?
Regards.
BI Consultant
Hi all,
I also can't see any principle problem with using concatenation in mapping table and applymap (see attached sample).
Could you be a bit more precise in telling us what you mean with "not work" (Error message, no results, wrong results, computer crashes etc)?
Regards,
Stefan
Hi all,
Thanks for ideas. I've used the Stefan's example to give you more details.
Basically, I see now it's not an issue with using concatenated fields it's an issue of using it in For...Next loops or using several pairs of tables like for several companies and changing a variable.
I'm getting incomplete results as I don't get connected ALL key fields from the FACT tables and associating MAP tables for second, third, etc tables. I got it connected only for the first table. Please check the modified example Stefan gave me. Thanks a lot.
Regards
swuehl wrote:
Hi all,
I also can't see any principle problem with using concatenation in mapping table and applymap (see attached sample).
Could you be a bit more precise in telling us what you mean with "not work" (Error message, no results, wrong results, computer crashes etc)?
Regards,
Stefan