Skip to main content

Hi All,

I’m working on a workbench to help my team with some geo-processing. The plan is to upload the workbench to FME Flow therefore my team can run it on demand.

I have included a FeatureReader transformer at the beginning of the workflow to read a GDB containing cadastral polygon data. This is an User Parameter in the workbench therefore the user will be including the input.

The GDB should always have the same fields/order, any variation in the scheme...the tool will fail,

How can I check and inform the user at the beginning of the process that the scheme doesn’t follow the standard GIS schema?

I was think about the SchemeScanner or ChangeDetector...but open to suggestions

Here is a very basic screenshot that shows two FeatureReaders → Features To Read (Only Schema),

 

One way to do this is to make use of a FeatureReader only reading the schema, then test the schema feature with what you need / expect, and if it validates use a second FeatureReader to read the data.

The schemafeature is just a feature with a list with the attributes, so you can explode these and use a featuremerger to check if any of the attributes you need exist in the way you expect them. If you have one or more unmerged features, then the validation fails.


Thanks @nielsgerrits It worked thanks, below an screenshot of your proposed solution for completeness:

 

 


One way to do this is to make use of a FeatureReader only reading the schema, then test the schema feature with what you need / expect, and if it validates use a second FeatureReader to read the data.

The schemafeature is just a feature with a list with the attributes, so you can explode these and use a featuremerger to check if any of the attributes you need exist in the way you expect them. If you have one or more unmerged features, then the validation fails.

Attached sample demonstrating this:

 


As far as the “informing the user” part of your question. You could set up a terminator with a custom message detailing the failure due to schema mismatch, maybe include their schema vs what was expected.


On FME Flow present the workspace as a Workspace App. Let the workspace use the Data Upload Service, so users can upload their files to use in the workspace.

Let the workspace create an HTML page to show results, including a description of errors the workspace encounters while processing the input.

Use HTMLReportGenerators for the different parts of the HTML page, and HTMLLayouter to combine the parts into one HTML page.

 


Reply