Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
raadwiptec
Creator II
Creator II

applymap

hi all,

I have a scenario --

my mapping table is as below and based on the compid and productsoldto --- I will take the country details

compid   productsoldto           country

1                lptransport                  uk

2                usainctransport           usa

3                califtransport               afg

4                xxxxx                           ken

5                abc                                cape

my main table has the following data -

country  sales  products

we load this main table from an external file - before loadng and applymap is in the code which checks the mapping table then loads the country details

in the excel sheet I get few additional company ids which is not in the mapping but I want to see to that it has to be along with

for ex

excel sheet -  so for 44 I want include in the apply map with 4

compid  sales products

1

2

3

4

44

5

1 Solution

Accepted Solutions
Anonymous
Not applicable

after mapping, you have to write like this:

If(CompanyID='44','4',CompanyID) as CompanyID

View solution in original post

7 Replies
raadwiptec
Creator II
Creator II
Author

Hi Balraj,

I need add an additional company id without adding it into the mapping table? and further doing it in apply map

its_anandrjs

In the mapping only unique values get mapped other wise use joins here or simple association on the application.

For more please share sample file.

Regards,

Anand

Anonymous
Not applicable

then you need this first:

Incremental load without date in Database

Incremental Load without Updated Date and Time

First fetch all the new Company IDs from excel using Incremental then applymap

raadwiptec
Creator II
Creator II
Author

hi anand yes ur correct only unique value get mapped. So if their is an non unique value then I would like to consider it along with one of them for example#

compid  sales products

1

2

3

4

44

5

so here 44 is non mapped. probably in a if ondition if 44 then ......it is as 4.

raadwiptec
Creator II
Creator II
Author

hi all is their a way where I can concatenate or anything different where I can code that if it Is 44 then its '4'

Anonymous
Not applicable

after mapping, you have to write like this:

If(CompanyID='44','4',CompanyID) as CompanyID