6 Replies Latest reply: Aug 8, 2016 10:46 AM by Clément Meunier RSS

    Apply map

    Clément Meunier

      Hi,

       

      I have just upgraded qlik sense in 3.0 version and i have a problem with the "Apply map (attached picture).

       

      Thanks for your answers,

       

      Clément

        • Re: Apply map
          Sunny Talwar

          Would you be able to share the complete script?

          • Re: Apply map
            Clément Meunier

            Yes :

             

            TablecorrespondanceSeg:

            Mapping LOAD

                Machine,

                Segments

            FROM [lib://NA/Table de correspondance NA.xlsx]

            (ooxml, embedded labels, table is Segments);

             

             

            TablecorrespondanceEndUser:

            Mapping LOAD

                End_User1,

                "End User 2"

            FROM [lib://NA/Table de correspondance NA.xlsx]

            (ooxml, embedded labels, table is [End user]);

             

             

             

             

            TablecorrespondanceEtat:

            Mapping LOAD

                Etats,

                "Nom de l'état"

            FROM [lib://NA/Table de correspondance NA.xlsx]

            (ooxml, embedded labels, table is Etats);

             

             

            TablecorrespondanceDDM:

            Mapping LOAD

                Counties,

                "Area"

            FROM [lib://NA/Table de correspondance NA.xlsx]

            (ooxml, embedded labels, table is DDM);

             

             

            TablecorrespondanceRange:

            Mapping LOAD

                "AEM Range 1",

                "AEM Range 2" as "AEM Range"

            FROM [lib://NA/Table de correspondance NA.xlsx]

            (ooxml, embedded labels, table is Range);

             

             

             

             

             

             

             

             

            // **************************************** Traitement des données et jointures des tables ****************************************

             

             

             

             

            Don:

            LOAD

                Company_Number,

                Product_Id,

                Product_Label as 'AEM Range',

                Chart_Label,

                Activity_Label,

                Model_Label,

                "Year",

                Period as Month,

                Geography_Label as Counties,

                Customer_Type_Label,

                End_Use_Label,

                Applymap('TablecorrespondanceSeg',Model_Label,'Correspondance non trouvée : ' & Model_Label) as Segment,

                Applymap('TablecorrespondanceEndUser',End_Use_Label,'Correspondance non trouvée : ' & End_Use_Label) as "End user",

                if(right(Geography_Label,3)='ZFG' OR right(Geography_Label,3)='CFG', Applymap('TablecorrespondanceEtat',right(Geography_Label,3),'Correspondance non trouvée : ' & right(Geography_Label,3)), Applymap('TablecorrespondanceEtat',right(Geography_Label,2),'Correspondance non trouvée : ' & right(Geography_Label,2))) as "State name",

              if(right(Geography_Label,3)='ZFG' OR right(Geography_Label,3)='CFG', Applymap('TablecorrespondanceEtatRegroupement',right(Geography_Label,3),'Correspondance non trouvée : ' & right(Geography_Label,3)), Applymap('TablecorrespondanceEtatRegroupement',right(Geography_Label,2),'Correspondance non trouvée : ' & right(Geography_Label,2))) as Area,

                Applymap('TablecorrespondanceDDM',Geography_Label,'Correspondance non trouvée : ' & Geography_Label) as "DDM",

                'Yes' as "Adressable Market",

                "Count" as Gehl

            FROM [lib://NA/*gehl*.txt]

            (txt, codepage is 1252, embedded labels, delimiter is ',', msq)

            Where Activity_Label='New Retails' and not WildMatch(Product_Id,'EX05','EXHC','IF21','IF23');

             

             

            Concatenate

             

            [................]

             

             

             

            Thanks for your answer

              • Re: Apply map
                Sunny Talwar

                I am not seeing anything wrong in your script. Did this problem come up after you started using 3.0 and was this working before?

                • Re: Apply map
                  Stewart Judson

                  Hi

                   

                  I cannot see anything wrong with your script either, but I have had this error after an upgrade to 3.0 & have managed to fix it.  It looks like previous versions were more tolerant than 3.0, I had an Apply_Map to a mapping that didn't exist which was working fine before the upgrade.

                   

                  To test the hypothesis, copy the project to another file & comment out the Apply_Maps, then re-run.  If this works, add them in one by one until it fails - it worked for me & I've added details in case anyone else has this error & finds this question as I did.

                   

                  Regards, Stewart

                • Re: Apply map
                  Clément Meunier

                  Yes it was working before, the problem appeared when i have upgraded in 3.0.

                  • Re: Apply map
                    Clément Meunier

                    It's it was a problem with a mapping table (i make a mistake).

                     

                    Thanks for your answers