snowflake.snowpark.functions.fl_get_relative_path¶
- snowflake.snowpark.functions.fl_get_relative_path(e: Union[Column, str]) Column [source]¶
Returns the relative path 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_relative_path(to_file("@mystage/testCSV.csv")).alias("file")) >>> df.collect()[0][0] 'testCSV.csv' This function or method is in private preview since 1.29.0.