1 Reply Latest reply: Nov 13, 2014 3:38 AM by Friedrich Hofmann RSS

    Loading Metadata into Qlikview Load Script

    Tushar Suvarna

      Hi ,

      I have a client where i have deployed an application and i want to improvise on Qlikview Load Architecture .

      My requirement is simple and straightforward .  Suppose i have a  SQL table with 20 columns as of now and i have loaded the table into QVW file  till now everything is fine now the client decides to add few more columns now the thing is every time he has to depend on our services to add new columns into Load scripts .  Is it possible to write the names of tables , columns , derives columns into a file lets say an Excel file  and then load the excel file which in turn loads the mention tables and columns which is given in the excel . Its like Putting the Metadata into excel and pulling the excel the load the real data dynamically .


      The advantage this approach will give us is that the client can dynamically add /remove tables column from the Excel meta data file without having to depend on our services and work independently to add delete column.





      Thanks ,


        • Re: Loading Metadata into Qlikview Load Script
          Friedrich Hofmann

          Hi Tushar,


          in principle this should work.

          You can

          - load the Excel_file

          - generate variables from the lines of the Excel_files (for the names of tables and/or columns)

          - perform the actual LOAD using these variables.

          Of course, for use within a LOAD, you will need variables like >field1< through >field10< or so - you can get those numbers if you parse the Excel_file in a LOOP.

          The general form of the code you have to use to turn the lines of the Excel_file into variables is like this:



          LET v_RowCount = NoOfRows('Vorgabewerte');
          FOR i = 0 TO ($(v_RowCount)-1)
          LET v_VarName = field' & PEEK('Name_KPI', $(i), Vorgabewerte);
          LET v_VarValue = PEEK('Sollwert', $(i), Vorgabewerte);
          LET $(v_VarName) = v_VarValue;


          Best regards,