Modified Spark code for SmartDataLakeBuilder