Skip to main content
Solved

Does the "Before Script" and "After Script" in JDBC writer step support parameterisation?


may_kwok
Star Blazer L3
Forum|alt.badge.img+4

I have a use case to use the JDBC writer step to write some data into a MS SQL db.

I will need to use the Before and After script feature. (Truncate the table in the before script, then I need to call a stored proc in the after script).

And in the after script, I need to construct that based on some value that I calculate in the plan. So it is different every time I run the plan, but I need to keep it consistent.

Does this after script support some parameterisation? I have a feeling it won’t but wanted to double check.

Best answer by AKislyakov

Hi @maykwok_hamilton 

No, before and after scripts are executed only once and thus do not accept any parametrization coming from the plan. What you can do is indeed define before and after scripts as parameters and pass those from the workflow. 

View original
Did this topic help you find an answer to your question?

2 replies

may_kwok
Star Blazer L3
Forum|alt.badge.img+4
  • Author
  • Star Blazer L3
  • 83 replies
  • December 6, 2023

If the answer is no then I think I’ll need to wrap this in a .ewf and parameterise it into the Execute SQL task. Just wanted to check that I need to go down this approach?


Forum|alt.badge.img+2
  • Ataccamer
  • 149 replies
  • Answer
  • December 7, 2023

Hi @maykwok_hamilton 

No, before and after scripts are executed only once and thus do not accept any parametrization coming from the plan. What you can do is indeed define before and after scripts as parameters and pass those from the workflow. 


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