5 Replies Latest reply: Jan 11, 2018 1:11 PM by bryan schnugg RSS

    Using concat() in load script?

    bryan schnugg

      I am trying to concat a field by another field in my load script, but am running into an issue where the load stops when it gets to this portion. PlacementsTable appears to load fine, then after showing the lines fetched the load just seems to be processing.

       

      Here is an example of my code, one complication is that I am trying to do this after a left join. Is it possible the resident table should be PlacementsTable instead of MainTable?

       

      Unfortunately I cant attach any data for proprietary reasons, so hopefully this is enough for someone to help!

      PlacementsTable:

       

      left join (MainTable)

      load

      text("TDLINX Code") as "TDLINX Code",

      Capitalize("Marque Description") as "Marque Description",

      "Placement Type"

      From *

      (qvd);


      Concat1:

      Load "TDLINX Code", Concat("Placement Type",',') as Placements Resident MainTable Group By "TDLINX Code";

        • Re: Using concat() in load script?
          Petter Skjolden

          At first glance this looks perfectly normal and valid. How many rows are there in the two tables?

           

          If you leave out the concat operation how long does the join take? Are you running this in Qlik Sense Desktop or in Qlik Sense Enterprise?

          • Re: Using concat() in load script?
            bryan schnugg

            I think it may have just been a processing time issue...I ran for 2 hrs (I know, I know) and no progress, so then I tried mixing up the order a bit and got the load to work relatively quickly with the following script:

             

             

            PlacementsTable:

             

             

            LOAD

             

                text("TDLINX Code") as "TDLINX Code",

                 Capitalize("Marque Description") as "Marque Description",

                "Placement Type"

            FROM [lib://Master Data Source Location (ws-na_singhvi)/MH SF PLACEMENT.QVD]

            (qvd);

             

             

            Concat1:

             

             

            LOAD "TDLINX Code",Concat("Placement Type",',') as Placements Resident PlacementsTable Group By "TDLINX Code";

             

             

            NewPlacements:

            left join (MainTable)

            LOAD

             

               "TDLINX Code",

               "Marque Description",

               "Placement Type"

              

            Resident PlacementsTable;

            Drop table PlacementsTable;

             

            The concatenation is pulling in far more values than I anticipated, but I suppose that is something else entirely. Thanks for the help Petter, I will mark this as closed.