Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Learn how to migrate to Qlik Cloud Analytics™: On-Demand Briefing!
cancel
Showing results for 
Search instead for 
Did you mean: 
ga1996
Contributor
Contributor

Data has not been loaded. Please correct the error and try loading again.

I am trying to load this script:

 

 

 

LOAD
    ProductID,
    UnitCost
FROM [lib://Case_study_3:DataFiles/abc_4.0.xlsx]
(ooxml, embedded labels, table is products);


// ----- UnitCost Map ----- //
UnitCost_Map:
MAPPING LOAD 
    ProductID,
    UnitCost;
SQL SELECT 
    ProductID,
    UnitCost
FROM products;

 

 

 

but I get this error:

Started loading data
 
products Lines fetched: 78
 
The following error occurred:
There is no open data connection.
 
The error occurred here:
SQL SELECT
         ProductID,
         UnitCost
FROM products
 
Data has not been loaded. Please correct the error and try loading again.
 
 
What am I doing wrong here? Any help would be highly appreciated.
Labels (4)
2 Replies
AshutoshBhumkar
Partner - Specialist
Partner - Specialist

Hello,

Try like below, taking resident after SQL table loads..

 

// ----- UnitCost Map ----- //
UnitCost_Map:
LOAD
ProductID,
UnitCost
SQL SELECT
ProductID,
UnitCost
FROM products;


UnitCostMapping:
MAPPING LOAD
ProductID,
UnitCost
Resident UnitCost_Map;
Drop Table UnitCost_Map;

 

Thanks,

Ashutosh

 

vinieme12
Champion III
Champion III

your error message is right here

 

The following error occurred:
There is no open data connection.
 
make sure you add the connection to the database table into the load script before running any SQL commands
 
you must connect to your DB connection as
"LIB  CONNECT TO <your connection name>" before running sql statements
 
Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.