Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started