Any way to get the CAT-reader to display its fme_basename?
Page 1 / 1
Hi,
sounds like a bug, but you can use an AttributeExposer to get the value regardless.
David
Hi Sig,
As Davied mentioned, the AttributeExposer exposes fme_basename and so on.
But in my test, fme_basename contains the folder name in which the input file is saved, not the file name. Maybe it's not what you need...
Tested in FME 2013 SP4.
If you need to get the input file name, how about the ParameterFetcher (fetch SourceDataset_CAT param value) and the FilenamePartExtractor?
Takashi
I need fme_basename to be the fme_basename - ie the filename + extension: myfile1.cat myfile2.cat etc.
So its a bug I guess, as mentioned the AttributeExposer does not work as expected.
The workaround was to use the solution below, thanks for giving me the right direction!:
Good to know you got a workaround.
The Text File reader + AttributeSplitter (split the text line with #s#s#s...) + AttributeRenamer could be also a workaround.
fme_basename and fme_dataset of the Text File reader contain file name (without extension) and full path of the source file.
Hi,
Why not just use the Directory and File Pathnames reader?
Hi Itay, I thought of that too, but couldn't find how to read the CAT file (and append the file name to CAT features) based on the source file path from the Directory and File Pathnames reader...
Hi Takashi,
I see what you mean.
Itay