You will want to fanout out the GDB writer based on the folder name, but first you will need to extract the information from the source features, which will be stored in the format attribute fme_dataset (after you expose it on the reader).Next, use an AttributeSplitter with \ as the delimiter. This will create a list of each element in the source directory path for each feature. Since it's not guaranteed we know the exact number of folders in the full path, we need to count how many elements are in the directory path. We can use a ListElementCounter for that.
Then on the GDB writer parameters, enable the Fanout parameter and copy this expression in. This should name your gdb after your containing folder.
@Value(_list{@Evaluate(@Value(_element_count)-2)}).gdb
Hope that helps.
You will want to fanout out the GDB writer based on the folder name, but first you will need to extract the information from the source features, which will be stored in the format attribute fme_dataset (after you expose it on the reader).Next, use an AttributeSplitter with \ as the delimiter. This will create a list of each element in the source directory path for each feature. Since it's not guaranteed we know the exact number of folders in the full path, we need to count how many elements are in the directory path. We can use a ListElementCounter for that.
Then on the GDB writer parameters, enable the Fanout parameter and copy this expression in. This should name your gdb after your containing folder.
@Value(_list{@Evaluate(@Value(_element_count)-2)}).gdb
Hope that helps.
@inframan Not sure if you saw my original post, but I edited the post with a more direct solution.
I figured that would be part of it, just figured out the rest. FilenamePartExtractor to get the folder name and use it with a Fanout on the writer.