cancel
Showing results for 
Search instead for 
Did you mean: 

Need Answer Please

Former Member
0 Kudos


1. Source has some 1 lakh records , have to load to  2 different tables in target equally 50% each, there are no condition, Just each table should be loaded with 50% records?

Thanks

Madhu

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello

Firstly, the title of your question really isn't helpful.

Right, on with your interview question - use a query to add a number column populated using gen_row_num.  Next, use a case transform to direct odd numbers down one route and even another, this can be done using the mod function.

Michael

former_member200473
Contributor
0 Kudos

Hi Micheal,

Please correct me if I am wrong ,

I think here we can use Query transform with Filter condition instead of Case Transform .

I remember Query transform with filter condition is more optimized than Case transform.

Thanks & Regards,

Shiva Sahu

Former Member
0 Kudos

Hello

I don't know if you're right or wrong (although you did spell my name incorrectly).

You could replace the case with 2 query transforms, but I doubt that would have any performance benefit in this example unless the source was a table (it isn't specified) and had a column that could be used to partition the data.  In which case, the use of the query tranform might allow push-down of the partition logic, or even the whole dataflow.

My solution would work for any source.

Michael


Answers (0)