remove_env | Manage User Environments | Open Analytics Framework - remove_env - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
Language
English (United States)
Last Update
2024-04-03
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

Use the remove_env function to remove specific user environment from Open Analytics Framework. The remote user environments are created using the create_env function.

Do not trigger remove_env() on any environment if install_lib/uninstall_lib/update_lib is running on the corresponding environment.

Required Argument

env_name
Specifies the name of the environment to be removed.

Optional Argument

**kwargs: Specifies the keyword arguments.

asynchronous
Specifies whether to remove environment synchronously or asynchronously.
When set to True, environment will be removed asynchronously. Otherwise, the environment will be removed synchronously.
Default value is False.

This function returns True, if operation is synchronous; otherwise, it returns a string containing 'claim_id'.

Example 1: Remove 'Fraud_detection' env synchronously from the Open Analytics Framework

>>> remove_env('Fraud_detection')
User environment 'Fraud_detection' removed.
True

Example 2: Remove 'test_env' env asynchronously from the Open Analytics Framework

>>> remove_env("test_env", asynchronous=True)
Request to remove environment initiated successfully. Check the status using list_user_envs(). If environment is not removed, check the status of asynchronous call using async_run_status('ab34cac6-667a-49d7-bac8-d0456f372f6f') or get_env('test_env').status('ab34cac6-667a-49d7-bac8-d0456f372f6f')
'ab34cac6-667a-49d7-bac8-d0456f372f6f'

Example 3: Remove 'Sales_conda_env' env synchronously from the Open Analytics Framework

>>> remove_env('Sales_conda_env')
User environment 'Sales_conda_env' removed.
True

Example 4: Remove 'test_conda_env' env asynchronously from the Open Analytics Framework

>>> remove_env("test_conda_env", asynchronous=True)
Request to remove environment initiated successfully. Check the status using list_user_envs(). If environment is not removed, check the status of asynchronous call using async_run_status('238ce31e-03c6-486d-b78c-a7498714fe3d') or get_env('test_conda_env').status('238ce31e-03c6-486d-b78c-a7498714fe3d')
'238ce31e-03c6-486d-b78c-a7498714fe3d'