snowflake.snowpark.functions.fl_get_last_modified¶
- snowflake.snowpark.functions.fl_get_last_modified(e: Union[Column, str]) Column [source]¶
Returns the last modified date of a FILE.
Example:
>>> import json >>> # Create a temp stage. >>> _ = session.sql("create or replace temp stage mystage").collect() >>> # Upload a file to a stage. >>> r = session.file.put("tests/resources/testCSV.csv", "@mystage", auto_compress=False, overwrite=True) >>> df = session.range(1).select(fl_get_last_modified(to_file("@mystage/testCSV.csv")).alias("file")) >>> type(df.collect()[0][0]) <class 'datetime.datetime'> This function or method is in private preview since 1.29.0.