Aws Data Brew -

77 Views Asked by At

I have requirement, I have 3 columns A,B,C in data i want to put if..else / switch condition on C columns and if true then return A*B values. That means output of any condition result math functions on A,B columns. Please help me how to achieve this in AWS- DataBrew. Ex... A,B,C Input data columns..

If(C.equals('XYZ'))
{
   new Column D = A*B;
}else if(C.equals('ABC'))
{new Column D = A/B; }
else {new Column D = A}

Expecting below result in Databrew-- A,B,C -- input data columns

If(C.equals('XYZ'))
{
   new Column D = A*B;
}else if(C.equals('ABC'))
{new Column D = A/B; }
else {new Column D = A}
0

There are 0 best solutions below