Question: convert below Hive QL into spark program - select distinct a . branch _ number, b . post _ code, case when a . location
convert below Hive QL into spark program
select distinct a
branch
number,
b
post
code,
case when a
location
format is NULL and a
location
type like "Petrol
Filling
Station" then "Petrol"
when a
location
format is NULL and a
legacy
format
code like
PH
then "Pharmacy"
else a
location
format end as store
format
description
from channels
reporting.vw
channels
locations a
inner join
select distinct location
id
post
code from location.location
LATERAL VIEW INLINE
array
address
post
code
where lifecycle
status like "Trading"
b
limit is for testing
on a
location
id
b
location
id
where
a
lifecycle
status like "Trading"
and a
country
code like
GB
;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
