Solved

Execution package when data in source table is not empty

  • 14 July 2023
  • 1 reply
  • 97 views

Hello.

I have a scheduled execution package which takes data from ODX, transforms data in DSA database and loads final tables to MDW. This execution package basically runs a perspective containing this process.

I need to setup following logic:

  • If data in any source table (ODX) of this execution package is empty (i.e. at least 1 empty table)
    • Do not execute the package
  • If data in all source tables (ODX) of this execution package contain any data (i.e. all tables non-empty)
    • Execute the package

Is there any way how i can setup this? Maybe even create additional “control” execution package? The version of TX i am running is 20.10.34.64

 

Thank you!

icon

Best answer by rogier.helmus 17 July 2023, 11:29

View original

1 reply

Badge +1

Hi Gediminas,

You could try the following:

  • Use a query to get the size of all tables in your ODX layer and adjust it such that it will count the number of valid tables that have no rows. https://stackoverflow.com/questions/7892334/get-size-of-all-tables-in-database.
  • Create a project variable of the type “Dynamic query” with the ODX as the context and with the query as the value. The variable now contains the count of tables with 0 rows.
  • Use the parameter as a condition in your execution package

     

Greets,

Rogier

 

Screenshots

 

 

 

 

Use the Show Value Translation to check if the query returns an amount of tables:

 

 

Reply