ingest-bronze-silver_sdp.py
Change {"quality": "bronze"} to {"quality": "silver"}
####################################################################################
## B. Silver Table ##
####################################################################################
@dp.table(
comment = "This table will create, drop and categorize columns from the bronze table.",
table_properties = {"quality": "bronze"}
)
def health_silver():
return (
dp
.read_stream("health_bronze")
.withColumn("HighCholest_Group", project_functions.high_cholest_map("HighCholest")) # UDF - highcholest_map
.withColumn("Age_Group", project_functions.group_ages_map("Age")) # UDF - group_ages_map Age
.drop("file_name", "file_modification_time", "processing_time") # Drop unnecessary metadata columns
)