This content has been marked as final.
Show 2 replies
-
1. Re: Is it possible to obtain the name of the files that are processed by the file translator?
rareddy Feb 2, 2015 9:29 AM (in response to lmann99)Leslie,
On "getTextFiles" or "getFiles" call, there is second result available other than "file" called "filePath", that should give you the name of the file. You can project that out or use it in some other computations.
select x.filePath, x.file from ( exec getTextFiles("path/foo.txt) ) x
Ramesh..
-
2. Re: Is it possible to obtain the name of the files that are processed by the file translator?
lmann99 Feb 2, 2015 6:47 PM (in response to rareddy)Thanks, that works! I've been using the 'flat file' wizard and just had to add the extra column...
- select colA, colB, ..., colX, f.filePath from ( exec getTextFiles("path/foo.txt) AS f, TEXTTABLES(...) ) x