Skip to main content
Question

Pass Table Name Parameter to a Script Action

  • May 13, 2021
  • 1 reply
  • 0 views

I have a generic stored procedure that does some custom post processing based on the table that has just been reloaded (Executed).  The stored procedure takes a parameter "TableName".  I've created a Script Action that executes the stored procedure.  I need this Script Action to run as a Post Step after the last execution step is run for one of several tables.  I can create one script action per table with the tablename hardcoded, but I've got a lot of tables to work with and would really prefer do this as a parameter containing the current table name.  Is the currently executing table name available in a system parameter somewhere and/or is there a way to create one that can be referenced by a script action?

1 reply

  • Community Manager
  • 152 replies
  • May 13, 2021

Hi Larry, the below solution is about as close as you can get to what you are looking for: 

  1. Create a SQL Snippet & parameterize the TableName in the snippet.
  2. Create a script action from the SQL snippet, and map the table to the parameter once for that snippet. (this will replace all instances of the parameter with the actual table name) Just be sure you specify the table variant (Raw or Valid table).
  3. Repeat step 2 for each table.

Sf8lVvSw46zifbeYJU7R9w.png

i-EfzTkkGOgyB4VV3_60Og.png


Reply


Cookie policy

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

 
Cookie settings