pyspark.sql.functions.
input_file_name
Creates a string column for the file name of the current Spark task.
New in version 1.6.