6 Replies Latest reply: Nov 30, 2016 11:02 AM by Granger Godbold RSS

    Export Data Load Script

    Praveena Velagapudi

      Can we export Data load script in QlikSense?

        • Re: Export Data Load Script
          Steve Dark

          Hi Praveena,

           

          Did you find a way to do this in the end?

           

          Steve

          • Re: Export Data Load Script
            Mark James

            Hello Praveena,

             

            This may not be directly what you need but the scripts which are executed are actually logged in the following location:

             

            C:\ProgramData\Qlik\Sense\Log\Script

             

            This will give you a text log format of the script itself.

             

            Please mark this answer as helpful and correct if this helps.

             

            Thanks,

             

            Mark

            • Re: Export Data Load Script
              Granger Godbold

              No, there still isn't a way from QlikSense.

               

              But there is a work around that will be very helpful as your number of Apps increases. If you don't put the load scripts into QlikSense, you don't need to export/import them. Instead, you make your scripts available through a Folder data connection (e.g. SharedLoadScripts). Then, in the App's load script, use Must_Include to pull in the script(s) you need for that App. E.g. $(Must_Include='LIB://SharedLoadScripts/some-script.qvs');   I'm presently refactoring all of my Apps to use this approach.

               

              Pros:

              • Keep scripts (.qvs) in version control. (And Notepad++ has decent syntax-highlighting thanks to Matt Fryer)
              • Update App load scripts without logging into QlikSense.
              • Share generic script-sections between multiple Apps.
              • Update multiple App load scripts quickly (1 script-section shared between 20 Apps? 1 file needs to be updated, not 20 Apps).
              • Reduce maintenance-related bugs/errors due to having to copy/paste script updates across multiple Apps.
              • Syntax errors in included script files still provide good context in the error message.
              • You can nest includes! Your load script in QlikSense can simply include a single file, and then that file could have all the includes to pull in the actual load script sections you want to use for the App.

               

              Cons:

              • Testing cannot be done outside of QlikSense, so more complex scripts can require more complicated setup to test. E.g. if you're working on 1 section of a 20-section script, you'll want that 1 script directly in the load script editor so you can play in the debugger.
              • Syntax errors in scripts can't be fixed within QlikSense.