remove_file | Script Method | Teradata Python Package - remove_file - Teradata Package for Python

Teradata® Package for Python User Guide

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Teradata Package for Python
Release Number
20.00
Published
December 2024
ft:locale
en-US
ft:lastEdition
2025-01-23
dita:mapPath
nvi1706202040305.ditamap
dita:ditavalPath
plt1683835213376.ditaval
dita:id
rkb1531260709148
Product Category
Teradata Vantage

Use the remove_file method to remove user installed files or scripts from Vantage.

Required arguments:
  • file_identifier specifies the name associated with the user installed file. It cannot have a database name associated with it, as the file is always installed in the current database.
  • force_remove specifies if system checks for the file being used before removing it.
    • If set to True, then the file is removed even if it is being executed.
    • If set to False, which is the default value, then an error is thrown if it is being executed.

Example 1: Install a file found at the relative path using default text mode and then remove the file

  • Follow steps in install_file to install a file using default text mode.
  • Remove the installed file.
    >>> sto.remove_file (file_identifier='mapper', force_remove=True)
    File mapper removed from Vantage

Example 2: Install a file found at the relative path using binary mode and then remove the file

  • Follow steps in install_file to install a file using binary mode.
  • Remove the installed file.
    >>> sto.remove_file (file_identifier='binaryfile', force_remove=False)
    File binaryfile removed from Vantage