def spark_read_file(file_path,file_format,schema=None): input_data = ( spark.read.format(file_format) # .option("basePath", base_path) .option("header", "true") .schema(schema) .load(f"{file_path}*") ) return input_data
def spark_read_file(file_path,file_format,schema=None): input_data = ( spark.read.format(file_format) # .option("basePath", base_path) .option("header", "true") .schema(schema) .load(f"{file_path}*") ) return input_data