Hi,
Destination dataset name is saved as a Published Parameter named "DestDataset_***" by default. When the destination format is file-based one, the destination dataset name is the output folder path which was set by user. Using the Published Parameter, several transformers and the fanout function would help you, for example: 1) Add an attribute retaining the output folder path to each feature by AttributeCreator: Attribute Name: _folder_path Value: $(DestDataset_***) $(...) means value of a Published Parameter, you can get output folder path by linking to "DestDataset_***" parameter. 2) Split the folder path string at the delimiter by AttributeSplitter: Attribute to Split: _folder_path Delimiter of Format String: \\ List Name: _list 3) Get the last element of _list (i.e. folder name) by ListIndexcer: List Attribute: _list{} List Index: -1 "-1" indicates the last element index of the list, so _list will retain the folder name. 4) Create preferable output file name by StringConcatenator: Destination Attribute: _output_name String Parts: (Constant) GSM_Sectors_ (Attribute Value) _list 5) Set fanout attribute on the writer: Check Funout By Attribute checkbox and select _output_name.
Hope this helps.
Alternatively if you want to avoid the list you could just use a FilenamePartExtractor to grab the folder name from the DestDataset parameter and then use that in the StringConcatenator.
Hello,
you can use the dataset fanout option in the advanced writer options in the navigator.
First I set up my workspace -> generate workspace -> create reader and writer
Then I put in a TimeStamper to assign a date to an attribute.
In the next step I use a StringConcatenator to bring together fme_basename and the value of the TimeStamper (-> @Value(fme_basename)_@Value(_timestamp))
Now I got to the Dataset fanout in the navigator.
As fanout directory I use a general output folder:
C:\\FMEData\\FMEData\\Data\\Transit\\out
In the 'attribute to fanout on' I use my _concatenated result form the string concatinator
In my case I use Shape and I get an Output folder with subfolders that have
the fme basename and the timestamp
-> BikeRoutesH_20130301
I hope this approach will help you,
best regards,
Stefan
Thank you for all the responses I was able to get the output just the way I wanted it.
Sincerely,
EM