Activity 6
You will write a function to simulate the data cleansing process of the products table. As you receive this table, you will perform the following data manipulations to make the data more integrated and more consumable.
- Typically, in a production system, for compliance and liability reasons, you would like to keep the data from the source unchanged and stored for a long period. You will instead make a copy of these tables and perform your data operations on the copies. So, as the first step, duplicate the
productstable into a copy called theproducts_newtable. - Create a function called
update_products, which performs the following tasks:- Add a column to the
products_newtable calledlast_update_date, and populate the column with the current date. This will be the record of when the product information was last updated in the system, which is important for data quality checking. - Remove products that have been discontinued (having a non...
- Add a column to the