Building SQL UDF Functions for Customer 360 Data
Requirement
Information: Data cleaning is crucial for customer 360 data to improve analysis and BI report accuracy. We need to ensure that weather data is cleaned according to business requirements. Typically, the cleaning process occurs in the silver layer, with the silver table serving as the source for the gold layer (reporting layer).
Requirement: Create a Databricks SQL script to save each of the following cleaning requirements for customer_360_raw as permanent functions in Databricks so they can be used in the future:
- Split the name column into first_name and last_name.
- Verify that the email column contains valid values.
- Combine address, city, state, country, and zip into a full_address.
Select all the above created UDF saved in purgo_playground schema to validate the output.
Unity catalog information: purgo_playground.customer_360_raw.
Expected output: Databricks SQL script and Functions in purgo_playground Database