Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have several transaction tables with a DATE field on them all linked to a CUSTOMER table via a CUSTOMER_ID.
In my CUSTOMER table I also have a field ACTIVE_DATE
When I load my data to Qlik Sense I want to only load records from the transaction tables where the DATE > ACTIVE_DATE for the consultant linked to the transaction.
In SQL this would be:
SELECT
TRANSACTION_ID, TRANSACTION_DATE, TRANSACTION_AMT
FROM
TRANSACTION T
INNER JOIN
CUSTOMER C on C.CUSTOMER_ID=T.CUSTOMER_ID
WHERE
T.TRANSACTION_DATE > C.CUSTOMER_DATE
How do I write this in a Qlik Sense load script?
Are you loading data into your Qlik Sense using SQL? If you are, then you can use the below query and it would only load data which meets your condition
I am new to Qlik Sense and all I know how to do is load single csv files in using the LOAD statement.
I have no idea how to incorporate SQL joining queries into the load script. Can you do that?
All you need to do is this:
TableName:
LOAD *;
SQL SELECT
TRANSACTION_ID, TRANSACTION_DATE, TRANSACTION_AMT
FROM
TRANSACTION T
INNER JOIN
CUSTOMER C on C.CUSTOMER_ID=T.CUSTOMER_ID
WHERE
T.TRANSACTION_DATE > C.CUSTOMER_DATE;
You can add a preceding load here, but if you don't want to do any manipulation in Qlik Sense, then you don't have to put it there
TableName:
SQL SELECT
TRANSACTION_ID, TRANSACTION_DATE, TRANSACTION_AMT
FROM
TRANSACTION T
INNER JOIN
CUSTOMER C on C.CUSTOMER_ID=T.CUSTOMER_ID
WHERE
T.TRANSACTION_DATE > C.CUSTOMER_DATE;
Sunny,
I'm new to QlikSense, but he will need to setup an ODBC connect as well, correct? Just like we do in QlikView.
Stan
Yes, we def. need that as well . Thanks for pointing that out