Skip to main content
Question

Write the result on the same folder as the input


Forum|alt.badge.img

Hello

I have a work-space that is converting CVS files to SHP files. Right now the work-space creates all the SHP into a specific folder, but I need the SHP to be inside each of the folder that contains the CVS.

Current Situation

  • Root
    • Folder 1 (CVS)
    • Folder 2 (CVS)
    • Folder 3 (CVS)

       

    • ....
    • SHP 1, SHP 2, SHP 3...

Goal

  • Root
    • Folder 1 (CVS), SHP 1
    • Folder 2 (CVS), SHP 2
    • Folder 3 (CVS), SHP 3
    • ...

Best regards,

David

3 replies

gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • June 16, 2016

usefull are file and directory Reader and FilenamePartExtractor.

Then fanned out writing of your shapes.

Either concatenate fanout attribute or use fan out for filename and fanout in navigator.


Forum|alt.badge.img

I have the the fanout Dataset active. This is where each SHP is assigned the name of the of the file based on attribute of the CVS file.

I split the FME_Dataset and concatenated to be at the fanout directory.

@Value(_listPathFile{0})\\@Value(_listPathFile{1})\\@Value(_listPathFile{2})\\@Value(_listPathFile{3})\\@Value(_listPathFile{4})\\@Value(_listPathFile{5})\\@Value(_listPathFile{6})\\

but it does not work.


jdh
Contributor
Forum|alt.badge.img+28
  • Contributor
  • June 16, 2016

Expose the fme_dataset, connect a FilenamePartExtractor (you only need the _dirname)

On the writer feature type set the shapefile name to the attribute from the CSV file.

On the writer parameters set the Destination Esri Shaepfile Folder to your root Directory.

Set Fanout Dataset to Yes and the Fanout Expression to @Value(_dirname)


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings