Skip to content
Advertisement

File metadata such as time in Azure Storage from Databricks

I m trying to get creationfile metadata.

File is in: Azure Storage
Accesing data throw: Databricks

right now I m using:

JavaScript

but it returns

JavaScript

I do not have any information about creation time, there is a way to get that information ?

other solutions in Stackoverflow are refering to files that are already in databricks Does databricks dbfs support file metadata such as file/folder create date or modified date in my case we access to the data from Databricks but the data are in Azure Storage.

Advertisement

Answer

It really depends on the version of Databricks Runtime (DBR) that you’re using. For example, modification timestamp is available if you use DBR 10.2 (didn’t test with 10.0/10.1, but definitely not available on 9.1):

enter image description here

If you need to get that information you can use Hadoop FileSystem API via Py4j gateway, like this:

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement