Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

Data Load Editor questions

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 :-)

Tags (1)
1 Solution

Accepted Solutions

Re: Data Load Editor questions

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.


talk is cheap, supply exceeds demand
7 Replies

Re: Data Load Editor questions

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.


talk is cheap, supply exceeds demand
awhitfield
Esteemed Contributor

Re: Data Load Editor questions

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

Employee
Employee

Re: Data Load Editor questions

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

Not applicable

Re: Data Load Editor questions

Thanks a million Mike - this really helps!

Employee
Employee

Re: Data Load Editor questions

Hi Graham - great to hear. Please let us know how else we can help you. :-)

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

Not applicable

Re: Data Load Editor questions

I tried adding the where condition, how come it's not being applied?

Total output in database: 300k

Qliksense with where condition: still running after 300k

Re: Data Load Editor questions

No idea. Why don't you start a new discussion for this question and provide more information? Check that you use the correct case sensitive field names and field values in your where clause.


talk is cheap, supply exceeds demand