Skip to main content
Question

Scripted python parameter value changes when feature caching is on


arnovananrooij
Contributor
Forum|alt.badge.img+5

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

mark2atsafe
Safer
Forum|alt.badge.img+45
  • Safer
  • November 12, 2021

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.


mark2atsafe
Safer
Forum|alt.badge.img+45
  • Safer
  • November 12, 2021
mark2atsafe wrote:

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


arnovananrooij
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • November 15, 2021
mark2atsafe wrote:

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings