Hi Mark,
I've experienced some of the same issues, although not necessarily at the same place as you do). It seems that FME is not always entirely consequent in the way it expands parameter macros.
The only solution I know of is to create a Python scripted parameter that returns the entire contents and then to bind it to to the desired setting using right-click / link to parameter.
Example python scripted parameter
username = FME_MacroValuesr"P_USERNAME"]
end_sql = "DELETE FROM DB_UPDATED WHERE USERUPDATED = '" + username + "'"
return end_sql
David
Hi David
Fast repsonse as always - Do you live on here ? :-)
Your suggestion was what was similar to something I thought of but thought there must be something simple I'd missed!
My workaround was a Private Parameter (not Python Scripted) configured:
DELETE FROM DB_UPDATED WHERE USERUPDATED ='$(P_USERNAME)'
and link this to the END SQL
Mark
Hi Mark,
your solution is equally elegant, but you've probably discovered by now that I am a big fan of Python in FME, so there you go ;-)
David
PS: it's a question of being efficient while FME does its thing
Have just realised it isn't a single query to execute :-(
Might use a SQLExecutor and a trigger of Creator with Create at End = Yes
Hi Mark,
You're correct that this doesn't work now. I'm not sure why but from my talks with the developers it seems that this could be implemented. So this is filed as PR#43215 and I will let you know when the fix is in place.
Regards
Mark
Product Evangelist
Safe Software Inc
Hi Mark,
I mailed the Safe Support Team and got an answer confirming this. Thanks for the reply on here.
Mark