span8
span4
There are special cases to be aware of when watching files and folders using FME Server.The following page describes these in detail and suggests some helpful tips.
多文件数据集的复杂性(例如ShapefileS地理数据库) presents challenges when using the Directory Watcher.In these cases,您需要确保在处理数据之前已上载所有必需的文件。The following discusses the various approaches:
The easiest solution is to package your data as a.压缩文件。Since FME can read .zip directory for many formats,将打包文件提供到监视位置而不是多个文件是有意义的。
如果.zip不是一个选项,或者您正在编辑被监视资源中的现有数据,在处理之前缓冲时间是有意义的。This can ensure that the data is complete before being utilized.A simple method for this process is to include aDeceleratortransformer at the start of the workspace.“创建”触发器将发生,running the workspace which will then sit for an allotted amount of time before processing.这种方法有一个缺点,因为作业会在等待时捆绑一个FME引擎。这种方法最适合于较小的多文件数据集。
观察多文件数据集的更好方法是在FME服务器上设置一个预定的作业。To do this you would capture the Modify trigger from a multi-file dataset,filter for the desired extension (i.e.“小水电”,buffer the current time and then use the REST API to create a one-time schedule to process the workspace.The benefit of this approach is that this 亚搏在线workflow does not tie up an engine while waiting for the files to finish uploading.
The attached workspace (Scheduled_Watch.fmw) demonstrates this process.
在处理单个文件数据集时,最好使用一个工作区/引擎来处理其中的许多数据集。For example,What if an image translation service is setup using FME Server and and the FTP Watch publication.When a GeoTIFF file is uploaded to the FTP directory,它会被重新投影并转换成jpeg。Using this scenario,if 5 images are uploaded to the directory,then 5 separate jobs are created on the server.这可以通过一点干预变得更聪明。
在Directory Watch with Idle Time Delay: Advanced Tutorial有一个数据库用于存储来自Modifynotification (i.e.filename).After a certain amount of time,a second workspace running by a scheduled task analyzes the database and processes appropriate files.We can use the same technique to process multiple single file datasets at one time using a single workspace.
To create this 亚搏在线workflow you must set up two workspaces,the first stores theCreatenotification details along with a timestamp into a database while the second workspace is designed to analyze the database and process the data.This workspace should decide which files have been stored for an appropriate amount of time,read them into the 亚搏在线workflow using a FeatureReader transformer and then process the entire set of files (i.e.reproject and translate).
A large file may cause the watch protocol to report multipleModifytriggers when the file is changed.This is due to the length of time it takes to save changes to the file when it is stored on a local drive.There is a special parameter within the Directory Watch publisher calledMin Time Elapsed (Seconds).This setting will impedeModifytriggers from being reported for a file until a minimum amount of time has been reached (Note: this setting is not necessary when the directory is using a UNC path as the Modify trigger will occur after the file has completed saving).
Directory Watch Publisher Tutorial (2016)
Tutorial: FME Server Watch Publisher (2015)
Streaming features from PostGIS to Amazon SQS - Process in FME
Directory Watch with Idle Time Delay (Advanced) (2015)
Directory Watch Publisher Tutorial (2017)
Receiving email,Part 1: Setting up a topic and an email address (2015)
Streaming features from PostGIS to FME using WebSockets
Directory Watch Publisher with Idle Time Delay (Advanced) (2016)
© 2019 亚搏在线Safe Software Inc |Legal