Solved

How to use variables to usage conditions

  • 20 January 2023
  • 4 replies
  • 83 views

Userlevel 3
Badge +1

I would like to run a job only if the number of records in the raw table it’s diferent of the number of records in the valid table wit a condition.

How can I do it?

icon

Best answer by daniel 20 January 2023, 10:04

View original

4 replies

Userlevel 4
Badge +5

Dear rvgfox,

I've done a test for you and I hope this helps:

  • Create a Project variable and set it to the table you would like to check.
    • Be aware that if this table is incremental this function, the checking of raw and valid record is equal, will not work because the raw table will contain only the newly loaded records
  • Create a new execution package and put in the tables you want to reload if the condition is right (or not)
  • Put in the project variable in the Usage condition 

 

Hope this helps!

Take care

= Daniel

Userlevel 3
Badge +1

Thank you very much Daniel,

But, in your example the raw table has values from the previous execution because the raw table it’s filled in the same job, isn’t it?

 

Userlevel 4
Badge +5

I ran a full load on that table so in that case the Raw and the valid table should have the same rowcount because it hase ran in 1 run. The raw table cannot have row from a previous execution and the valid table not I believe.

Userlevel 5
Badge +7

It might be useful to know the use case you are trying to achieve, as there may be a different solution entirely.

You could make separate execution packages for ODX (or other layer) transfer and Data Cleansing Rules for the tables you want and apply variable-driven conditions to the latter.

Reply