snowflake.snowpark.functions.fl_get_last_modified

snowflake.snowpark.functions.fl_get_last_modified(e: Union[Column, str]) Column[source] (https://github.com/snowflakedb/snowpark-python/blob/v1.30.0/snowpark-python/src/snowflake/snowpark/functions.py#L11739-L11759)

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.
Copy
语言: 中文