pyspark.sql.functions.input_file_name

pyspark.sql.functions.input_file_name() → pyspark.sql.column.Column

Creates a string column for the file name of the current Spark task.