Apache Hive – Assignment-5

The majority of the blog entries are written in a style that novices may understand. I will give some practice tasks to be completed using Apache Hive in order to develop learning abilities and to provide practical exposure and knowledge growth.

There will be a set of assignments with data sets, but without solutions.

Title : Windowing Functions.
Dataset: Click here.

Dataset

Assignment:
A CSV data file including city-wise sales information is supplied to you. Your assignment as follows:

1)
Skip the header of the CSV and Load the data based on below table-structure.
YYYYMM INT,
Location VARCHAR(10),
Amount DECIMAL(7,2)

2) Get cumulative average of the sales amount as shown below.
movingaverage
3) Get the running/moving average of the sales amount as shown below.
runningaverage

Hints: Click here.

All the best.

One comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s