Sat Dec 04, 2021 10:33 pm
Login Register Lost Password? Contact Us


failing the test case,using assert

Comments and questions related to the Enterprise Control Language

Thu Mar 07, 2019 11:14 am Change Time Zone

Hi, team
i have logical file list out of that i didn't,remaining two file is available or not
and i need to return the those two file which is not available,using assert
this list
sulaiman::contactinfo::contactinfo.csv
sulaiman::companyinfo::companyinfo1.csv
sulaiman::labexecise1::personsinfo
sulaiman::labexecise1::uniquestatecityrecords
sulaiman::stringmodi::fullname.csv
sulaiman::empoyeeinfo::empdetails.csv

and missing file which is in doubt

movieslenstask2::sulaiman::incoming::movies.csv
movieslenstask2::sulaiman::incoming::ratings.csv

ecl code is
import std.File;
IMPORT File.IncomingLogicalFiles;
//File.LogicalfileList(namepattern := 'sulaiman*');
// IncomingLogicalFiles.CompanyDay1LogicalName;
FileListRecSet:=TABLE(File.LogicalfileList(namepattern := 'sulaiman*'),{name});
FileListRecSet(name in [IncomingLogicalFiles.CompanyDay1LogicalName]);
suleman Shreef
 
Posts: 21
Joined: Wed Feb 27, 2019 9:15 am

Thu Mar 07, 2019 1:01 pm Change Time Zone

hi, richard can you suggest this is right or any other approach

IMPORT std.File;


ds2:=DATASET(['sulaiman::subfile::onlinenamephonesupd2',
'sulaiman::subfile::onlinenamephonesupd1',
'sulaiman1::subfile::nothing',
'sulaiman1::subfile::verything'],{varstring name1});

JoinDs:=JOIN(File.LogicalfileList(namepattern := 'sulaiman*'),
ds2,
left.name=right.name1,
right outer);
assert(JoinDs,name=name1,'this files is missing=>'+name1);


thanks and regards,
Suleman
suleman Shreef
 
Posts: 21
Joined: Wed Feb 27, 2019 9:15 am

Thu Mar 07, 2019 7:24 pm Change Time Zone

Suleman,

It works on my environment, but it needs to be run on hThor (Thor will error out on it).

HTH,

Richard
rtaylor
Community Advisory Board Member
Community Advisory Board Member
 
Posts: 1606
Joined: Wed Oct 26, 2011 7:40 pm

Fri Mar 08, 2019 4:41 am Change Time Zone

thanks Richard
suleman Shreef
 
Posts: 21
Joined: Wed Feb 27, 2019 9:15 am


Return to ECL

Who is online

Users browsing this forum: Google [Bot] and 1 guest

cron