Skip to main content
Question

Scan folder before starting workbench traitment


farfar
Contributor
Forum|alt.badge.img+11
Hi,

 

I use schedules to launch my workbench every x minute. my workbench starts by reading shp files into my folder. I have a problem if there are no file in folder, the job starts and i get errors with no files. I look for a solution to test if my folder contains files and continuous traitment of workbench. 

 

I try with python script but i can't.

 

Any help?

 

Thanks

6 replies

david_r
Celebrity
  • July 10, 2013
Hi,

 

 

have you tried setting "Ignore failred readers: yes" under the Workspace parameters / Advanced?

 

 

David

farfar
Contributor
Forum|alt.badge.img+11
  • Author
  • Contributor
  • July 10, 2013
Hi,

 

i try it but no change. i get each x minutes the FME_FAILURE in FME SERVER_jobs.

 

Other ideas? 

 

Thanks,

 

 

 

 


david_r
Celebrity
  • July 10, 2013
Hi,

 

 

another option could be to use the "Directory and File Pathnames" reader to count the files in the directory.

 

 

If count > 0, then pass it on to either a FeatureReader or a second workspace (WorkspaceRunner / FMEServerJobSubmitter). If count = 0, terminate.

 

 

David

farfar
Contributor
Forum|alt.badge.img+11
  • Author
  • Contributor
  • July 10, 2013
Hi,

 

its a good idea, but how could i retrieve count files? 

 

Thanks an advance.

 

 

 


fmelizard
Safer
Forum|alt.badge.img+19
  • Safer
  • July 10, 2013
Hi,

 

 

Each file or directory (according to how you set the reader) is a feature, so you can count the features, or use one of the features attributes.

farfar
Contributor
Forum|alt.badge.img+11
  • Author
  • Contributor
  • July 11, 2013
Hi,

 

David, Itay, thank you for your help.

 

I use Directory and File Pathnames readers and FeatureTypeFilter to retrieve path of files is are exist into the directory.

 

 

Farfar

 


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