Case Vs Validation

Hi,

I am using case transformation instead of validation for separating records that match two conditions. If value is NULL then upload records in a table, else in a different table.

The same can be done using validation also. Then how is this different? Will there be any change in the output for the above condition i mentioned?

Appreciate your answer.

Arun


Arun.K :us: (BOB member since 2011-10-18)

Well one main difference that would be so silly to tell is, Validation Transform can give only 2 outputs PASS or FAIL. So basically it can tell YES or NO to a condition, or a set of Multiple conditions.

Whereas the CASE Transform Produces any number of Output Branches…

Actually CASE Transform is to do a kind of processing on incoming data. Like say for New Employees, put END Date as NULL, For Terminated Employees, put today’s date as end date…etc.,

But Validation Transform is used mainly when your Target Database won’t have Conditional Constraints or when you load the final data into a file… In those cases we cannot afford sending a junk data. Say you send the Employee Direct Deposit to bank as file, you cannot afford having the Employee’s A/c number to be NULL. So we use Validation Transforms…


ganeshxp :us: (BOB member since 2008-07-17)

Thanks Ganesh.

But is it technically correct (i mean considering the process time, memory or best practices), if i use case instead of validation for my condition.

Arun


Arun.K :us: (BOB member since 2011-10-18)

The execution time difference between the Case and Validation transforms is probably very, very small. The Validation transform can gather statistics about the validation process. I have not used this feature, only read about it. It could be used by users to see how often a validation fails. The information can be accessed through the Management Console.


eganjp :us: (BOB member since 2007-09-12)

Another relevant point is that a Validation transform only produces two output streams (in version 3.x): pass & fail. A Case transform can produce multiple outputs, for as many cases as you’ve got, and can place a given input record in multiple output streams, if desired. Neither one’s “better” – they’re just different – and you need to pick the one that better fits your needs.

I’ve heard that the Validation transform is a bit of a pig when it comes to processing speed, but have never done any tests to vet that out.


JeffPrenevost :us: (BOB member since 2010-10-09)

Adding to the above points…
Validation transform produces two more output fields when the record got failed…DI_Error_Actions, DI_ErrorColumns. At times you have to produce a report on invalid records(usually it happens in client requirement)…so, through validation transform you it would be very clear and understandable as it pulls the invalid fields into a separate column(DI_ERRORCOLUMNS)… I haven’t found much difference in processing time between case and valdiation…

Thanks
Sarjan


sara7686 (BOB member since 2011-08-31)

Dear All,
in term of performance is better to use Case Transformer
or Validation transform ?

Best regards,
ZAV
:wave: :wave: :wave:


zavatta_fighter (BOB member since 2005-05-10)