5 Replies Latest reply: Sep 7, 2017 9:38 AM by Christian Schmitz RSS

    Load multiple qvds and use applymap

    Christian Schmitz

      Hi,

       

      I am loading 2 qvds with Targets ( same data structure, only different dates) and my problem is, when I load the qvds (Targets_07092017 and Targets_06092017), the preceding load with the mapping is generating two tables instead of one,

      my first table is than named "Targets" and have the Name mapped to the Targets, and the second table (which should not be there) is named "Targets_07092017", there the mapped Name is missing.

       

      If I am commenting the mapping table and the preceding load out, everything works fine...

       

      Does anybody know how to fix this?

       

       

      Thanks for your help, Chris

       

      MapTOP_NametoTargets:
      Mapping Load
      Distinct [Customer Code],
      Name
      Resident fact_table_tmp;

      Targets:
      LOAD *,
      applymap('MapTOP_NametoTargets',[Customer Code],null()) as Name ;
      LOAD
      [Customer Code],
      From,
      To, 
      Target,
      Time_Stamp

      FROM
      [$(vG.QVDPath)Targets_*.qvd]
      (qvd) where Time_Stamp>=$(vL.Date_Border)
      ;