7 Replies Latest reply: Jul 13, 2016 4:18 AM by Gysbert Wassenaar RSS

    Data Load Editor questions

    Graham Woods

      Hi,

       

      I'm relatively new to Qlik and I have a couple of questions regarding the data load editor; I'm using this instead of the Quick Load because I need to link a couple of files.

       

      First question.... On one of the files that I need to load, I'm really only interested in data where the field 'Status' is equal to 'In Progress'. Can I edit the Script to tell the load editor only to load these records and if so, how do I do this?

       

      Second question.... Each month I will need to replace the previous month's data with the current month. Will I need to delete the old script and create new scripts for the new month's files or can I replace the data (similar to the 'Add' or 'Replace' option in the Quick Data Load. As I will have links built into the script, I'm hoping that I can simply change the names of the files to the current month versions and Load the data, but I want to check if this is the correct method....

       

      Thanks for any help or information :-)

        • Re: Data Load Editor questions
          Gysbert Wassenaar

          1. Yes, you can edit the script. Add a WHERE clause as last line of the load statement (just before the final semicolon):

          WHERE Status = 'In Progress'.

           

          2. If you simply replace the source file with a new version that has the same file name then you only have to reload the data. It won't be necessary to change the script.

          • Re: Data Load Editor questions
            Andrew Whitfield

            Hi Graham,

             

            What are you loading data from? In essence you would put a where clause in the select statement part of the script.

             

            e.g. Where Status = 'In Progress'

             

            I'm hoping that I can simply change the names of the files to the current month versions and Load the data, but I want to check if this is the correct method....

             

            That's ok!

             

            Andy

            • Re: Data Load Editor questions
              Michael Tarallo

              Hi Graham, welcome to the Qlik Sense Community and thanks for your question.

               

              Gysbert and Andrew are both correct in their replies. However I'd like to add additional information and provide a sample.

               

              #1

              LOAD

                  Address,

                  City,

                  ContactName,

                  Country,

                  Customer,

                  CustomerID,

                  Fax,

                  Phone,

                  PostalCode,

                  CountryCode,

                  ISO3CountryCode

              FROM [lib://Sales/Customers and Categories.xlsx]

              (ooxml, embedded labels, table is Customers)

              Where Country = 'Germany';

               

              #2

               

              As long as the file structure remains the same changing the file name manually and reloading should work. If you wanted to use a variable to make it easier to make your changes you could do something like this:

               

              Set vFileName = 'Customers and Categories.xlsx';

               

              LOAD

                  Address,

                  City,

                  ContactName,

                  Country,

                  Customer,

                  CustomerID,

                  Fax,

                  Phone,

                  PostalCode,

                  CountryCode,

                  ISO3CountryCode

              FROM [lib://Sales/$(vFileName)]

              (ooxml, embedded labels, table is Customers)

              Where Country = 'Germany';

               

              Note that Qlik Sense Desktop is a free fully function product, but you need to manually reload the data. There is a online environment that has the same capabilities including administration, governance, security as well as a task scheduler to scheduler automated reloads. Just food for thought as you continue to explore Qlik Sense.

               

              BTW - If you have not already - please also take a look at: New to Qlik Sense Videos - where you can become familiar with Qlik Sense very quickly. Have fun and let us know how else we can help.

               

              Please mark the appropriate replies as CORRECT / HELPFUL so our team and other members know that your question(s) has been answered to your satisfaction.

               

              Regards,

              Mike Tarallo

              Qlik