Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi ,
I have a scenario as below
map:
Mapping Load.
X ,Y
...
SQL select * from ....table1
Load
X
y
ApplyMap('X .......) .
SQL ...table 2
now my issue is table 1 other than X and Y columns I have 4-5 additional columns which is very much required.
As a 3rd step ..I created a load statement again to table 1 to have the columns
Load.
X.
y,
Z,
DATE,
DATE2.
FROM tABLE1.
Mapping load works very good. But my additional columns that is Z , date 1 ,date 2 if I include them in the report. 2 problems occurs
1. if I include in the expression I get no data for these 3 columns.
2. if I include these 3 columns in the dimension I get data duplicated too much..
I don't really understand your problem here. Would it be possible to share some sample data with your expected output?
You should be more clear in the request,
please include the code of your load script and if you can also have a set of sample data,
so that they can experience directly and provide the necessary information more precisely.
Regards
G.
hi sunny,
The tables are bigger.. not sure how to give sample.. the scenario is very like this..
Iam using Table 1 as for my mapping load
table 2 -- for apply map...
now I have the common field from table 1 and table 2. for ex EmpId .. But I need the other columns of the table1 ..so I created again load statement
Load ....from Table 1 .
which consists the entire columns of table 1.
So now If I include those columns in my report
2 problems occurs
1. if I include in the expression I get no data for these 3 columns.
2. if I include these 3 columns in the dimension I get data duplicated too much..
Let me know its clear?
Unfortunately, I still don't completely understand what you are trying to achieve?
My assumption is that you have
1. Table 1 that has all the columns you need for your report.
2. Table 2 that has a field EMP_ID that exists in Table 1 too.
3. A mapping load of Table 1 because you need a field from Table 1 in to Table 2 as per your mapping load logic.
If you have to load every column form Table 1 then associate it with Table 2 based on Emp_ID then why do you need the mapping load.
If table 1 is your master table then you may think of joining table 2 to table 1.
It would be great if you could provide sample data with column details and dependencies.
sunny my question is how can I load the original mapping table with full columns.
Ex: Lets think I am going to do Mapping Load ......from Table1..
Now how do I load the original table 1 .
Is mapping Load table just a look table?
There are couple of ways to do it. The easier one is to create multiple mapping loads with two fields each (one of them will always be EmpID)
But if the information you are complete in Table 1 applies directly maps to the first full charge of the table
If I understand you can use a script like:
MappingTable:
Load
X ,Y
SQL select * from ....table1
Table1:
Load.
X.
Y,
ApplyMap(X,....) as mapping,
Z,
DATE,
DATE2.
From SQL select * from ....table1
hi sunny,
I made a sample here
map1:
MAPPING LOAD Distinct
prodid, ,
customerId
;
SQL SELECT prodid, ,
customerId
FROM ods.products
;
map2
LOAD
CustomerId ,
ApplyMap ('map1',customerId ) as CustId
name,
Address
street
bus
country
;
SQL SELECT
*
FROM ods.customer
now on my report.. i have all the columns of map2.now i need columns of map 1 also..so i created another load statement
Products:
MAPPING LOAD
prodid, ,
customerId ,
Product serial no,
description,
name
status
;
SQL SELECT *
FROM ods.products
;
now when i try to use the above columns
prodid, ,
customerId ,
Product serial no,
description,
name
status in the report
1. if I include in the expression I get no data for these 3 columns.
2. if I include these 3 columns in the dimension I get data duplicated too much..