Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
All,
I have a very simple script as below and not returning any data. I can see log files under ServerLogFolder/Script
for each FoundFile in filelist( 'lib://ServerLogFolder/Script ' & '\*.log' )
Load
left(Right('$(FoundFile)', len('$(FoundFile)') -index('$(FoundFile)','/',-1)),36) as App_ID
,Replace(@1,'/','\') as QVD_FILES
,FileTime('$(FoundFile)') as ReloadTime
FROM '$(FoundFile)'(txt, utf8, no labels, delimiter is ',', msq)
where Upper(@1) like '*.QVD*';next FoundFile
Can some one please help me to identify the cause for this issue?
Thanks
Upper(@1) like '*.QVD*' could be your issue.
Try using wildmatch instead.
WildMatch(@1, '*.QVD*')
Still don't work.
for each FoundFile in filelist( 'lib://ServerLogFolder/Script ' & '\*.log' )
Load
left(Right('$(FoundFile)', len('$(FoundFile)') -index('$(FoundFile)','/',-1)),36) as App_ID
,Replace(@1,'/','\') as QVD_FILES
,FileTime('$(FoundFile)') as ReloadTime
FROM '$(FoundFile)'(txt, utf8, no labels, delimiter is ',', msq)
where WildMatch(@1, '*.QVD*');
//where Upper(@1) like '*.QVD*';
next FoundFile;
Attached is the screen shot of the log files under the script folder.
Thanks
You need to figure out where the issue lies. What happens if you load without the where statement. Do you get any output then?
for each FoundFile in filelist( 'lib://ServerLogFolder/Script ' & '\*.log' )
Load
left(Right('$(FoundFile)', len('$(FoundFile)') -index('$(FoundFile)','/',-1)),36) as App_ID
,Replace(@1,'/','\') as QVD_FILES
,FileTime('$(FoundFile)') as ReloadTime
FROM '$(FoundFile)'(txt, utf8, no labels, delimiter is ',', msq)
;
next FoundFile;
Well, I did tried with out the where condition and still no records.
Will do some additional debugging..