Question

FeatureReader playback woes

  • 5 January 2023
  • 9 replies
  • 8 views

Userlevel 1
Badge +22

Hi all.

When running a FeatureReader normally, it outputs the schema feature for a given dataset before all features. This enables writing to a dynamic writer.

However, when attaching the dynamic writer to a previously run (and cached) FeatureReader, and then asking for playback, it seems that the schema features are apparently _NOT_ played back before the corresponding features from the same transformer, crashing the writer.

Is it true, is this really WAD ?

It kinda ruins the idea of incrementally building and debugging a workspace.

Cheers.


9 replies

Userlevel 3
Badge +13

Hello there @Lars I Nielsen​, please feel free to correct me if I am misunderstanding the issue! So the schema feature is being played back, but the data is reaching the writer before the schema is, which is causing the writer to crash? I have some additional questions as well:

  • Do you see any errors in the logfile you could pass along?
  • Would you be able to share a bit more information about how the workspace is set up (or an image would be great)?
  • What version of FME are you using?

Happy to help, Kailin.

Userlevel 1
Badge +22

Hi Kaitlin.

Your understanding is correct. But the rabbit hole is apparently deeper than expected.

I'm running 2020.2.5, as our FME server hasn't been upgraded to 2022 yet (two earlier attempts has been thwarted by bugs in FME, long story).

So I made a simple workspace with just a Creator, a FeatureReader, and a dynamic writer.

And I first tried it in 2022.1.1, with upgraded transformers, but this fails altogether, even when running the complete workspace !

I then made an identical workspace in 2020.2.5, and it works when running the complete workspace.

However, the funny thing is, when running them incrementally, i.e. first the FeatureReader, and then playback to the dynamic writer, they _both_ fail in the same manner.

I don't know what you've done with 2022 (and 2021), but 2020.2.5 is my very best friend for now.2023-01-06 09_19_01-Incremental FeatureReader to dynamic writer (U__GIS-teamet_FME Workspaces_Suppor2023-01-06 09_18_03-Incremental FeatureReader to dynamic writer (U__GIS-teamet_FME Workspaces_Suppor

Userlevel 1
Badge +22

Hi Kaitlin.

Your understanding is correct. But the rabbit hole is apparently deeper than expected.

I'm running 2020.2.5, as our FME server hasn't been upgraded to 2022 yet (two earlier attempts has been thwarted by bugs in FME, long story).

So I made a simple workspace with just a Creator, a FeatureReader, and a dynamic writer.

And I first tried it in 2022.1.1, with upgraded transformers, but this fails altogether, even when running the complete workspace !

I then made an identical workspace in 2020.2.5, and it works when running the complete workspace.

However, the funny thing is, when running them incrementally, i.e. first the FeatureReader, and then playback to the dynamic writer, they _both_ fail in the same manner.

I don't know what you've done with 2022 (and 2021), but 2020.2.5 is my very best friend for now.2023-01-06 09_19_01-Incremental FeatureReader to dynamic writer (U__GIS-teamet_FME Workspaces_Suppor2023-01-06 09_18_03-Incremental FeatureReader to dynamic writer (U__GIS-teamet_FME Workspaces_Suppor

And here's the 2022 workspace, because apparently I can only attach one file per reply.

Userlevel 1
Badge +22

Hi Kaitlin.

Your understanding is correct. But the rabbit hole is apparently deeper than expected.

I'm running 2020.2.5, as our FME server hasn't been upgraded to 2022 yet (two earlier attempts has been thwarted by bugs in FME, long story).

So I made a simple workspace with just a Creator, a FeatureReader, and a dynamic writer.

And I first tried it in 2022.1.1, with upgraded transformers, but this fails altogether, even when running the complete workspace !

I then made an identical workspace in 2020.2.5, and it works when running the complete workspace.

However, the funny thing is, when running them incrementally, i.e. first the FeatureReader, and then playback to the dynamic writer, they _both_ fail in the same manner.

I don't know what you've done with 2022 (and 2021), but 2020.2.5 is my very best friend for now.2023-01-06 09_19_01-Incremental FeatureReader to dynamic writer (U__GIS-teamet_FME Workspaces_Suppor2023-01-06 09_18_03-Incremental FeatureReader to dynamic writer (U__GIS-teamet_FME Workspaces_Suppor

And just for fun, I ran the 2022 workspace in 2023.0 beta, and updated the FeatureReader.

And it failed to run the complete workspace, just as in 2022.

The playback also failed, unsurprisingly.

Userlevel 3
Badge +13

And just for fun, I ran the 2022 workspace in 2023.0 beta, and updated the FeatureReader.

And it failed to run the complete workspace, just as in 2022.

The playback also failed, unsurprisingly.

Hello @Lars I Nielsen​, I am still looking into your issue! Thanks a ton for sharing the workspaces, I will get back to you soon. Best, Kailin.

Userlevel 3
Badge +13

And just for fun, I ran the 2022 workspace in 2023.0 beta, and updated the FeatureReader.

And it failed to run the complete workspace, just as in 2022.

The playback also failed, unsurprisingly.

Hello @Lars I Nielsen​, I have a feeling this is somewhat expected behavior. The ordering of features really matters for dynamic writing and as you suspect, the schema features must get to the writer before the data features. While I'm not 100% sure, It seems like something in feature caching run (or in other words, the "playback") may not work because something (eg. not an actual feature, but some information) is not passed from the FeatureReader to the writer, that is passed during a non-feature cached complete run. 

 

There are a few different methods you can use to control the order of features. By using a Sorter transformer, you can ensure the schema features are always read first, even if you use feature caching. Add an 'order' attribute (AttributeCreator) and assign a value of 0 to the schema features and 1 to all the other features, ordering in ascending numeric order to ensure the schema attributes are received first.

 

Other methods I tried that also worked: FeatureHolder, Decelerator, etc... but if you'll be working with an unknown number of features each run, I might stick to sorting!

 

Lastly, in order to get any of these methods to work, had to remove the value set for the 'Schema Definition Name:' parameter on the MSSQL_SPATIAL writer. It looks like that parameter is looking for the attribute on the data features and not the schema features. If I add an AttributeCreator after the Gadelys_lyspunkt port and set the attribute fme_feature_type_name to Gadelys_lyspunkt, it works (and then fails for the second feature type because those data features don't have the fme_feature_type_name attribute). 

 

image 

I’ve attached an updated workspace made in 2023.0, please take a look and let me know if you have any other questions! Thank you for your patience on this! Happy to help, Kailin.

Userlevel 1
Badge +22

And just for fun, I ran the 2022 workspace in 2023.0 beta, and updated the FeatureReader.

And it failed to run the complete workspace, just as in 2022.

The playback also failed, unsurprisingly.

Hi Kailin.

I'm sure that there are multiple ways to remedy a faulty behaviour, but it would be much better, if FeatureReader actually did the output in a manner that supports incremental development. Would it be possible to escalate this to development as a request for change ?

 

As for the parameters for the dynamic writer, I always assumed that setting "Schema Definition Name" was to give the field name of the _schema feature_, not the data features. Otherwise the lead text is a little misleading, as the available dropdown of attributes also lists the schema feature field names:

dynamic writer parametersLet me know what you think.

Cheers.

Userlevel 3
Badge +13

And just for fun, I ran the 2022 workspace in 2023.0 beta, and updated the FeatureReader.

And it failed to run the complete workspace, just as in 2022.

The playback also failed, unsurprisingly.

Hello @Lars I Nielsen​, yes, absolutely! I've filed this issue for development to consider (FMEENGINE-76158). I've made a note to have this thread updated as well. I think this may be the parameter that matches the schema feature to the data features. I can look further into this. Happy to help, Kailin.

Userlevel 1
Badge +22

And just for fun, I ran the 2022 workspace in 2023.0 beta, and updated the FeatureReader.

And it failed to run the complete workspace, just as in 2022.

The playback also failed, unsurprisingly.

Thanks Kailin :-)

Reply