12-19-2014 03:28 AM
I am trying to create universe(SAP BO) on top of Hadoop, I have succesfully connected the Hadoop Hive and play with the impala tables. To create a derived table i need impala syntax to run from BO to Hadoop. I need to find out the equivalent syntax for Decode in sql.
SUM(DECODE(CD.YEAR_TYPE, 'LY', CAR.LOCAL_ALLOCATIONS * CAR.LOCAL_NOMINAL_OCCUPANCY, 0)) AS LY_BED_NIGHTS,
Please help on this!!!
12-19-2014 10:22 PM
DECODE() is supported since Impala 2.0.
Please refer to:
Also DECODE() can often be rewritten as a CASE expression. Please refer to the docs for the particular version of Im[pala you are using.