Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Strange Load Script ERROR !

Hi guys,

I am getting a strange Load script error while using Include syntex.. but if I just use SQL query instead of include file then it works fine.

Re-laod Error.jpg

About my Application:

This is a staging application only used for creating QVD files

  • I store my SQL scripts, QVS scripts and QVD files in separate folders.
  • I set these folder paths in the beginning of load script and then I use include statements to include SQL scripts.


This is how it works..


Products: // Table Name

SQL  $(Include=$(vSQLpath)Products.sql) ; // vSQLpath = the location of SQL script folder

STORE Products into $(vQVDpath)Products.qvd(QVD); //vQVDpath = location where QVD is saved.

It runs 10 different SQL scripts like this and creates 10 different QVD files.

But this error message only appears in 2 - 3 tables and those scripts is not even complex SQL query.,. it is just selecting 4 columns from one single table in SQL.

I have attached SQL Script and Log file in this post.

Thanks

10 Replies
Anonymous
Not applicable
Author

Are you sure that the Text files only contains ascii character?

Which application do you use to create them?

Regards

Norbert

settu_periasamy
Master III
Master III

Have you tried directly instead of include statement... Like

Products: // Table Name

Load *;

SQL  SELECT dbo.ReportType.ReportTypeID AS [@ProductId],

  dbo.ReportType.Name AS [Product Name],

  dbo.ReportType.ServiceType AS [Product Category],

  dbo.ReportType.Code AS [Product Code],

  dbo.ReportType.ProviderType AS [Division]

FROM dbo.ReportType;

STORE Products into $(vQVDpath)Products.qvd(QVD); //vQVDpath = location where QVD is saved.

petter
Partner - Champion III
Partner - Champion III

The text file you include with SQL might be stored in UTF-8  format with a BOM (Byte Order Mark). This could possibly cause this error and it often looks like this. The BOM is two bytes at the beginning of the file which will not be interpreted correctly by software that are not up to date on all variants of text files.

Not applicable
Author

Thanks for reply Settu,

I have tried  SQL script instead of the include statement but it is not working on 2 of the tables.

However, those two table queries are working perfectly fine on SQL Server and returning expected result.

Not applicable
Author

Thank you for your advice Petter,

What is a possible solution to overcome this ? I prefer to use include statement because it is easy to version control the source ETL script

Not applicable
Author

Hi Norbet,

SQL scripts are usually saved directly as a .SQL file by using SQL server management studio.

All the other 10 SQL queries were saved using same method and that is why I am confused about why this would show error for only these query!

settu_periasamy
Master III
Master III

Hi Lokesh,

Can you post any other SQL script which working?

Not applicable
Author

Hi Settu, Sorry for late reply..

Here is another script.. which is working perfectly fine on SQL Server Management Studio and returning expected result.

SELECT 
FundId,
FundNameAS [Fund Name],
FundAdminAS [Fund Administrator],
AdminPhoneAS [Fund Admin Phone],
AdminFaxAS [Fund Admin Fax]

             

FROM        dbo.Funds
settu_periasamy
Master III
Master III

Not sure, but have you tried without  dbo.ReportType ?

Like

Products: // Table Name
Load *;
SQL  SELECT ReportTypeID AS [@ProductId],
           Name AS [Product Name],
           ServiceType AS [Product Category],
           Code AS [Product Code],
           ProviderType AS [Division]
FROM dbo.ReportType;

STORE Products into $(vQVDpath)Products.qvd(QVD); //vQVDpath = location where QVD is saved.