load files filtered by last_modified in PySpark

az38
New Contributor II

Hi, community!

How do you think what is the best way to load from Azure ADLS (actually, filesystem doesn't matter) into df onli files modified after some point in time?

Is there any function like input_file_name() but for last_modified to use it in a way ?

df = spark.read.json("abfss://container@storageaccount.dfs.core.windows.net/*/*/*/*/*.json").withColumn("filename", input_file_name()).where("filename == '******'")