Question: convert below SQL into spark program - select distinct a . branch _ number, b . post _ code, case when a . location _
convert below SQL into spark program select distinct abranchnumber,
bpostcode,
case when alocationformat is NULL and alocationtype like "PetrolFillingStation" then "Petrol"
when alocationformat is NULL and alegacyformatcode like PH then "Pharmacy"
else alocationformat end as storeformatdescription
from channelsreporting.vwchannelslocations a
inner join
select distinct locationid postcode from location.location
LATERAL VIEW INLINE arrayaddress postcode
where lifecyclestatus like "Trading"
b limit is for testing
on alocationidblocationid
where
alifecyclestatus like "Trading"
and acountrycode 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
