Question: Implementation of a system for sales data analytics using Cassandra NoSQL database Overview & background: An e - Commerce company in Europe is formulating sales
Implementation of a system for sales data analytics using Cassandra NoSQL database
Overview & background:
An eCommerce company in Europe is formulating sales strategy for the year based on the analysis of the sales data of The name of the sales data file is "Assignmentonlineretaildataset.csv This file contains records in which the first record is header. You need to use Cassandra NoSQL for the analysis. The column family design, cqlsh command used to create the columnfamily, command used to copy the data from the file into the columnfamily, queries used for analysis and the results of the analysis queries developed by you should be submitted.
Description:
METADATA
File name is Assignmentonlineretaildataset.csv The schema of the data set in this file is RecordNo Invoice, StockCode, Description, Quantity, InvoiceDate, UnitPrice, CustomerID, Country Some of the fields in some records may be blank. The analysis should be carried out by loading the data into Cassandra NoSQL database. The first record contains the schema definition and appropriate option should be set in the COPY command to skip the header record. No other modifications are allowed on the contents of the file. Negative values for quantity andor unitprice indicate returned items.
Column Family Table design
You need to design a suitable column family structure for maximum query performance. For reference, a whitepaper titled DataModelinginApacheCassandra.pdf is included. Select the partition key properly. While developing the queries:
You are allowed to create only one columnfamily and use the same columnfamily for all queries.
You may use allow filtering in queries if required.
You may create materialzed views from the table if required to execute some queries.
ANALYTICS:
Find answers for the following questions by developing appropriate analytical queries in Cassandra query language cqlsh:
Find total number of transactions in the given transaction file.
Find total value of sale happened in the year
Sale Price QuantityUnitPrice
Find total value of sale happened in USA.
List of countries from which purchases were made on the online shop.
Find country from which sale with the maximum value happened.
Find the countries from which the quantity in one sale of an item was
more than
Sample data
RecordNo Invoice StockCode Description Quantity InvoiceDate UnitPrice CustomerID Country CM CHRISTMAS GLASS BALL LIGHTS : United Kingdom P PINK CHERRY LIGHTS : United Kingdom W WHITE CHERRY LIGHTS : United Kingdom RECORD FRAME SINGLE SIZE: United Kingdom STRAWBERRY CERAMIC TRINKET BOX : United Kingdom PINK DOUGHNUT TRINKET POT: United Kingdom SAVE THE PLANET MUG : United Kingdom FANCY FONT HOME SWEET HOME DOORMAT : United Kingdom CAT BOWL: United Kingdom DOG BOWL CHASING BALL DESIGN : United Kingdom HEART MEASURING SPOONS LARGE : United Kingdom
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
