mani_22
Databricks Employee
Databricks Employee

@shrutikatyal  I believe the commit_time only functions when the cloudFiles.cleanSource option is enabled. I don't see this option present in your snippet. Could you please enable this option for the read and check? 

Refer to the below documentation, which specifies that column commit_time is supported in Databricks Runtime 16.4 and above when cloudFiles.cleanSource is enabled

https://docs.databricks.com/aws/en/sql/language-manual/functions/cloud_files_state

A file might be processed but marked as committed arbitrarily later. commit_time is updated usually at the start of the next microbatch.

View solution in original post