Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
erjohnso
Creator
Creator

Left join causing script load fail with no error message? Server vs. desktop?

Good afternoon all. In a simple data load, I am using a base data file then appending monthly data using Concatenate. In order to align all customers to master clients for historical trending, I also using a left join to add a crosswalk master client field where applicable. Here is an example data set, followed by the script:

Data tables:

Revenue:

CustomerNameCustomerIDClientNameClientIDSalesDollarsMonth
Customer AA1Client XX1100March 2011
Customer BB1Client YY1110July 2012
Customer CC1Client XX1140December 2012
Customer DD1Client ZZ1135April 2013

Revenue Update1Q:

CustomerNameCustomerIDClientNameClientIDSalesDollarsMonth
Customer AA1Client XX175July 2013
Customer BB1Client YY1120July 2013
Customer CC1Client XX1150August 2013
Customer DD1Client ZZ1130September 2013

Revenue Update 2Q:

CustomerNameCustomerIDClientNameClientIDSalesDollarsMonth
Customer AA1Client XX1120October 2013
Customer BB1Client YY1150November 2013
Customer CC1Client XX190December 2013
Customer DD1Client ZZ1100December 2013

CustomerIDAdjustedClientIDAdjFlag
C1Y1Y
D1X1Y

The purpose of the script is to merge the tables into one and add the additional columns that I can reference in a future script with an IF statement. When I run the the debug on the following, it runs with no error but I get the message that script has failed. I commented out various steps of the script and everything works except the LEFT JOIN. What am I missing here??? Thank you!

SCRIPT:

NoConcatenate

Revenue:

LOAD

    CustomerName,

    CustomerID,

    ClientName,

    ClientID,

    SalesDollars,

   Month

FROM

[..\External Data\FY11-FY13.txt]

(txt, codepage is 1252, no labels, delimiter is '\t', msq);

[RevenueUpdate1Q]:

Concatenate(Revenue)

LOAD

    CustomerName,

    CustomerID,

    ClientName,

    ClientID,

    SalesDollars,

   Month

FROM

[..\External Data\1QFY14.xlsx]

(ooxml, embedded labels, table is ALL);

[RevenueUpdate2Q]:

Concatenate(Revenue)

LOAD

    CustomerName,

    CustomerID,

    ClientName,

    ClientID,

    SalesDollars,

   Month

FROM

[..\External Data\Oct-Nov FY2014 by Entity.xlsx]

(ooxml, embedded labels, table is Sheet1);

Left Join(Revenue)

Adj:

LOAD

    CustomerID,

    AdjustedClientID,

    AdjustFlag

FROM

[..\External Data\Adjustments 120213.xlsx]

(ooxml, embedded labels, table is [Adjustments]);

STORE [Revenue] into ..\QVD\FYRevenue.qvd;

4 Replies
Not applicable

Hello,

Maybe works if you use a time stamp field or something like incremental Load.

Attach a file.

Best regards.

erjohnso
Creator
Creator
Author

Thanks. It has nothing to do with the concatenate... if I just use the base file and the left join, I get the script fail with no error message.

Revenue:

CustomerNameCustomerIDClientNameClientIDSalesDollarsMonth
Customer AA1Client XX1100March 2011
Customer BB1Client YY1110July 2012
Customer CC1Client XX1140December 2012
Customer DD1Client ZZ1135April 2013

Adj:

CustomerIDAdjustedClientIDAdjFlag
C1Y1Y
D1X1Y

SCRIPT:

Revenue:

LOAD

    CustomerName,

    CustomerID,

    ClientName,

    ClientID,

    SalesDollars,

   Month

FROM

[..\External Data\FY11-FY13.txt]

(txt, codepage is 1252, no labels, delimiter is '\t', msq);

Left Join(Revenue)

Adj:

LOAD

    CustomerID,

    AdjustedClientID,

    AdjustFlag

FROM

[..\External Data\Adjustments 120213.xlsx]

(ooxml, embedded labels, table is [Adjustments]);

STORE [Revenue] into ..\QVD\FYRevenue.qvd;

erjohnso
Creator
Creator
Author

Interestingly enough... the issue, though unresolved, has nothing to do with the code. When I run this script through the server version of QV, the script fails. When I run using my desktop version, the application functions as expected.

jpapador
Partner - Specialist
Partner - Specialist

Do you have access to write the QVD to that directory.  Also sometimes QV keeps files open, try deleting FYRevenue.qvd if it already exists and then try running the script.