I would extract YYYY-MM-DD from the source file name ("fme_feature_type" or "fme_basename") with the StringSearcher, then set the "File_" + <matched result attribute> to the destination feature type name in the writer feature type.
StringSearcher Parameters Example
- Search In: @Value(fme_feature_type)
- Contains Regular Expression: \\d{4}-\\d{2}-\\d{2}
- Matched Result Attribute: _first_match
I would extract YYYY-MM-DD from the source file name ("fme_feature_type" or "fme_basename") with the StringSearcher, then set the "File_" + <matched result attribute> to the destination feature type name in the writer feature type.
StringSearcher Parameters Example
- Search In: @Value(fme_feature_type)
- Contains Regular Expression: \\d{4}-\\d{2}-\\d{2}
- Matched Result Attribute: _first_match
Thank you so much. I tried to write .json format, the writer folder can't choose, the dataset have to set filename.json. With the .shp format, it's okie.
I would extract YYYY-MM-DD from the source file name ("fme_feature_type" or "fme_basename") with the StringSearcher, then set the "File_" + <matched result attribute> to the destination feature type name in the writer feature type.
StringSearcher Parameters Example
- Search In: @Value(fme_feature_type)
- Contains Regular Expression: \\d{4}-\\d{2}-\\d{2}
- Matched Result Attribute: _first_match
There are two types of Fanout - 'Dataset Fanout' and 'Feature Type Fanout'. Which one can be applied depends on whether the destination format is a file-based one or a folder-based one. Since JSON as destination is a file-based format, you can apply 'Dataset Fanout'.
See these links to learn more.
Hi,
I have a new question about search filename based on strings.
For example: A folder point that filename as: point1_2018-07-01, point2_2018-09-02,...
An other folder polygon that I will use to spatial join with point. The polygons have filename as: poly_2018-07-01, poly_2018-09-02...The point layer and polygon layer have date time the same in file name.
I want to ask that how to spatial join pair with this point layer with polygon the same date.
Thank you
Hi,
I have a new question about search filename based on strings.
For example: A folder point that filename as: point1_2018-07-01, point2_2018-09-02,...
An other folder polygon that I will use to spatial join with point. The polygons have filename as: poly_2018-07-01, poly_2018-09-02...The point layer and polygon layer have date time the same in file name.
I want to ask that how to spatial join pair with this point layer with polygon the same date.
Thank you
Once you have extracted the date part (YYYY-MM-DD) from their file names as an attribute, you can then set it to the Group By parameter of a transformer which you would like to use to perform spatial operations.