snowflake.snowpark.Session.remove_import

Session.remove_import(path: str) None[source]

Removes a file in stage or local file from the imports of a user-defined function (UDF).

Parameters:

path – a path pointing to a local file or a remote file in the stage

Examples:

>>> session.clear_imports()
>>> len(session.get_imports())
0
>>> session.add_import("tests/resources/test_udf_dir/test_udf_file.py")
>>> len(session.get_imports())
1
>>> session.remove_import("tests/resources/test_udf_dir/test_udf_file.py")
>>> len(session.get_imports())
0
Copy