2

Novice FME user here. I have an FME model that I need to run on a quarterly basis, which among other things writes an ESRI file geodatabase and calculates zonal statistics by way of a PythonCaller. I've had to amend the model slightly to extract min and max values from the zonal statistics tables, where previously it only extracted the max values.

Currently models has a FeatureWriter (to fgdb) which passes to a PythonCaller (runs zonal statistics and saves results to tables in the fgdb) to a FeatureReader (extract results from tables to pass to AttributeManager). Where I'm falling down is in the FeatureReader parameters, when I set the dataset parameter to $(Output_GDB) and then go to select the zonal statistics table outputs in "Feature Types to Read" I get a "Failed to retrieve feature types" error, essentially looking for an fgdb that doesn't exist.

I find that if I run the model, let it fail, then go back in and retrospectively point that FeatureReader to the fgdb created in the first run and assign the relevant values downstream, then delete the previous outputs and run it again, that it works. But this is redundant and impractical.

Does the $(Output_GDB) value not look for outputs from upstream in the model? and How can I get around this issue?

1

Well, $(Output_GDB) is a published parameter, and they are set at runtime, so no it won't look for previous outputs.

If the FeatureWriter is set to write to a dataset called $(Output_GDB) then I would expect you to be able to read it back without problem, because that's the same dataset it already wrote. Check the FeatureWriter to see what its dataset parameter is set to (maybe post a screenshot?).

However, if that's not the case then I don't know what $(Output_GDB) refers to. But the FeatureWriter will output an attribute called _dataset, saying where the data was written. So if you point the FeatureReader to @Value(_dataset) then it should be able to locate the fgdb you just wrote.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.