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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
griffin2571
Contributor
Contributor

Where Exist Clause in Data Load Editor not eliminating Car Vin Number Data that have empty data

I have data related to car vin numbers and their sources. In the Data Model/Data Load Editor I have added a "where exist" clause in the script load so that I only pull car vin numbers from the main source data. However, it still doesn't eliminate car vin numbers that aren't part of the main source system. Is there a better script idea besides using "Where exist"?

CarData is the main Source system and Honda is the data I am trying to load but using "Where Exist" on Honda so it only captures Car Vin Numbers that are only in CarData

CarData:
LOAD
'Car Vin Number',
'Status',
'Description',
'Point of Origin'

Honda:
LOAD
"Manufacturer",
"Car Vin Number",
"Type of Repair,
FROM [lib://Car Data- QVD Store/Country/Car_Data_DataModel.qvd]
(qvd)
where exists ("Car Vin Number")

Majority of the data gets captured but then I have Car Vin Number with no Manufacturer or type of repair. What would be a good script to eliminate them when loading data?

griffin2571_0-1667006567362.png

 

Labels (5)
1 Solution

Accepted Solutions
vinieme12
Champion III
Champion III


@griffin2571 wrote:

I have data related to car vin numbers and their sources. In the Data Model/Data Load Editor I have added a "where exist" clause in the script load so that I only pull car vin numbers from the main source data. However, it still doesn't eliminate car vin numbers that aren't part of the main source system. Is there a better script idea besides using "Where exist"?

 

If table CarData:  has ALL MANUFACTURERS data then the subsequent Exists clause will evaluate true for ALL VIN Numbers loaded after CarData table

If you only want to Load HONDA data then just use Exists on Manufacturer field

 

 

 

KeepManufacturer:
Load * Inline [
Manufacturer
HONDA
];

Honda:
LOAD
"Manufacturer",
"Car Vin Number",
"Type of Repair,
FROM [lib://Car Data- QVD Store/Country/Car_Data_DataModel.qvd]
(qvd)
where exists ("Manufacturer")


CarData:
LOAD
'Car Vin Number',
'Status',
'Description',
'Point of Origin'
From cardata.qvd(qvd)
Where Exists([Car Vin Number]);

drop table KeepManufacturer;

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.

View solution in original post

1 Reply
vinieme12
Champion III
Champion III


@griffin2571 wrote:

I have data related to car vin numbers and their sources. In the Data Model/Data Load Editor I have added a "where exist" clause in the script load so that I only pull car vin numbers from the main source data. However, it still doesn't eliminate car vin numbers that aren't part of the main source system. Is there a better script idea besides using "Where exist"?

 

If table CarData:  has ALL MANUFACTURERS data then the subsequent Exists clause will evaluate true for ALL VIN Numbers loaded after CarData table

If you only want to Load HONDA data then just use Exists on Manufacturer field

 

 

 

KeepManufacturer:
Load * Inline [
Manufacturer
HONDA
];

Honda:
LOAD
"Manufacturer",
"Car Vin Number",
"Type of Repair,
FROM [lib://Car Data- QVD Store/Country/Car_Data_DataModel.qvd]
(qvd)
where exists ("Manufacturer")


CarData:
LOAD
'Car Vin Number',
'Status',
'Description',
'Point of Origin'
From cardata.qvd(qvd)
Where Exists([Car Vin Number]);

drop table KeepManufacturer;

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.