Okay.
So for this assignment, we’ll create our gold layer tables.
I’ll keep this similar to a real world scenario and detail the requirements for the tables.
I’d like an order details table that contains the following.
An order ID column.
An order Date column.
So this order date should be at the day level.
A customer ID column, the store name and the total sales.
This table should be aggregated by order ID, order date, customer ID and store name to show the total order amount.
As a hint, please consider the order of your operations when finding the total order amount.
And again, save the file in a file format and use the tables from the silver layer.
Additionally, I’d like you to create an aggregated table to show the monthly sales total and save it in the gold layer as a parquet file called monthly underscore sales.
The table should have two columns.
Month underscore year.
This should be in the format of year in four digits hyphen the month as two digits, and it should also have the column total underscore sales.
Display the sales total rounded to two decimal places and sorted in descending date order.
As a hint, please consider the use of the date underscore format function and you can look that up in the spark SQL documentation.
Finally, I’d like you to create an aggregated table to show the monthly sales total by store and save it in the gold layer as a pocket file called store_monthly_sales.
The table should have three columns.
Month underscore, year store underscore name and total underscore sales.
Display the sales total rounded to two decimal places and sorted in descending date order.
Before you get started.
Please create a notebook in the six assignment section folder.
I call it to.
Silver to gold.
And you can post your solution code in this notebook.
Okay.
So best of luck.