Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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 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;
@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;