Question

Scripted python parameter value changes when feature caching is on

  • 11 November 2021
  • 3 replies
  • 0 views

Badge +4

Hi,

I have a scripted python parameter which generates a unique id. This parameter is used in a lot of SQLexecuters to to create and insert into temporary with this id in the name of the table and such. When I run the workspace it works fine, but when I put feature caching on the value of the parameter seems to change each time it's used in a SQLExecuter. Is this a knwn issue? Is there a simple work around?

I use FME 2021.1.3.0. I don't know if it worked before.

 

Thank you,

Arno


3 replies

Userlevel 4
Badge +25

I suspect the problem is that the parameter gets re-run every time the workspace is run - even if it's only a partial run. I've asked at Safe for clarification that this is true.

I think the workaround would be to fetch the value into an attribute early on in the translation. Then it doesn't matter if the script gets re-run. As long as the ParameterFetcher transformer isn't part of the partial run.

Userlevel 4
Badge +25

I suspect the problem is that the parameter gets re-run every time the workspace is run - even if it's only a partial run. I've asked at Safe for clarification that this is true.

I think the workaround would be to fetch the value into an attribute early on in the translation. Then it doesn't matter if the script gets re-run. As long as the ParameterFetcher transformer isn't part of the partial run.

Yes, I tried it myself and the parameter definitely is triggered each time a partial run occurs. I think this is how it's meant to work, but if you think this is a bug then please do contact our support team and ask them to look into it further. safe.com/support is the URL

Badge +4

Yes, I tried it myself and the parameter definitely is triggered each time a partial run occurs. I think this is how it's meant to work, but if you think this is a bug then please do contact our support team and ask them to look into it further. safe.com/support is the URL

Thank you for your response. In my opinion it's a bug so I will contact support.

Reply