I have two alternatives for you that might work. In my example, i used a input data tool but i'm sure this will work with a output data tool as wel.
Option 1 - Text input tool
Just make a macro like i did with a text box and action tool connected to the input data tool.
In the action tool you can select the post sql statement if i'm right. Once you added the macro to your workflow, you can fill in the text box and it will alter the table name by the name you entered.
Option 2 - Parameter tool
Basically with the same setup but replacing the text input tool by the parameter tool, you can use a value from f.e. a text input tool or incoming data as input for a batch macro. The macro will then reply the table within the post sql.
Unfortunately, i can't send you my example as i'm using company connections to test the setup.
Thank you, this seems like a good solution! For my use case works, as we can replace specific text and keep different suffixes. Makes me wonder though -- If I needed more than one paramater in the post/pre SQL, how would that be approached.
I'm not sure but my best guess is that you can just add more text input tools/parameter tools to the macro and attach them to the output data tool. Let them replace the right string in the post SQL statement and you should be fine to use more parameters !