Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
GrantBooth
Creator
Creator

Load Only Certain Tables

I am working on monthly reporting for my business and have sit a snag. Each month I need to import our financial data, and then later on in the month I need to import commentary on this data. The problem  is that the financial data can be updated in the background, so if I load when I load the commentary new financial data is uploaded. I am trying to find a solution to load the financial data at one date, lets say 1st of the month, and the commentary later, let's say 15th of the month.

I am currently loading two tables which are store in our data warehouse, "finance" and "commentary"

Is anyone able to help out with a solution here?

Labels (1)
2 Replies
Or
MVP
MVP

Assuming the data is loaded and then stored into a QVD, this should be easy enough to do with an if statement. My syntax might be slightly off as I have no way of checking it at the moment, but the general gist should be clear.

// Only load financial data on the 1st of the month

If Day(Today())=1 THEN

Table1:

Load *;

SQL SELECT *

FROM FINANCIAL;

Store Table1 Into Wherever.qvd;

// Once stored, no longer needed

Drop Table Table1;

END IF

// Always load the data from QVD, regardless of whether it was just updated or not

Financial:

Load * From Wherever.qvd;

// And then load the commentary. This could also be done with an IF should you wish to

Commentary:

Load *;

SQL SELECT *

FROM COMMENTARY;

justISO
Specialist
Specialist

Hi, you can play around with IF ELSE maybe? For example, you always load your finance table first and with IF ELSE you load commentary table only if date is later than 15th of the month:

finance:
LOAD * INLINE [
YOUR FINANCE TABLE];

IF day(today())>=15 THEN

commentary:
LOAD * INLINE [
YOUR COMMENTARY TABLE];

END IF;