Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Not applicable

Some issues with mapping load and apply map function

Hello Team ,

There is some issues that i am coming across while trying to use the mapping load and apply map function.

I have a table which i am extracting from Vertica DB and there is a where condition in the end which says

WHERE PROD.PROD_LN_ID IN ('PL1','PL2','PL3','PL4','PL5','PL6','PL7','PL8','PL9');

once this is extracted i do a mapping load

Maptest:

mapping load distinct column1

PC_PL as cat_type

resident maintable

where match(upper(PROD.PROD_LN_ID),'PL1','PL2','PL3');

once this is completed i do an apply map query in my next table as below

applymap('Maptest',column1,'Print_PL') as category


however , though i have mentioned it to only pick specific PL's for PC_PL, it is picking additional PL's that are not PC_PL in the list as well


can you please tell me if this is incorrect or any other alternative that you can suggest

8 Replies
chinnakatikisg
Valued Contributor

Re: Some issues with mapping load and apply map function

Hi,

I think in where clause you have to write the "exists".

Regards,

Chinna

Not applicable

Re: Some issues with mapping load and apply map function

Have you missed a comma here?

Maptest:

mapping load distinct column1 ,

PC_PL as cat_type

resident maintable

where match(upper(PROD.PROD_LN_ID),'PL1','PL2','PL3');

Thanks,

Singh

chinnakatikisg
Valued Contributor

Re: Some issues with mapping load and apply map function

Or you may write like this:

Maptest:

mapping load distinct column1,

PC_PL as cat_type

resident maintable

where upper(PROD.PROD_LN_ID) = ('PL1') or upper(PROD.PROD_LN_ID) = ('PL2') or upper(PROD.PROD_LN_ID) = ('PL3');


this is working. I hve just tested.


Regards,

Chinna

Re: Some issues with mapping load and apply map function

To check Mapping is work or not try to load data individually first then use it like mapping table and remove mapping key word.

Maptest:

load distinct column1

PC_PL as cat_type

resident maintable

where match(upper(PROD.PROD_LN_ID),'PL1','PL2','PL3');


Note:- by this only 'PL1','PL2','PL3' data loaded.


Regards

Anand

chinnakatikisg
Valued Contributor

Re: Some issues with mapping load and apply map function

Hi,

Mixmatch() also works in where clause for your case

where mixmatch(PROD.PROD_LN_ID,'PL1','PL2','PL3')

regards,

Chinna

MVP & Luminary
MVP & Luminary

Re: Some issues with mapping load and apply map function

Hi Ravi,

Check this script

Maptest:

mapping load distinct

     column1,

     PC_PL as cat_type

resident maintable

where Mixmatch(PROD.PROD_LN_ID, 'PL1','PL2','PL3') = 1;


Hope this helps you.


Regards,

jagan.

Not applicable

Re: Some issues with mapping load and apply map function

THank you every one .... implemented a mix of logics you described and it worked well...

MVP & Luminary
MVP & Luminary

Re: Some issues with mapping load and apply map function

Hi,

Tried this simpler one

Maptest:

mapping load distinct

     column1,

     PC_PL as cat_type

resident maintable

where Mixmatch(PROD.PROD_LN_ID, 'PL1','PL2','PL3') = 1;


Regards,

Jagan.