Teradata Package for Python Function Reference on VantageCloud Lake - async_run_status - Teradata Package for Python - Look here for syntax, methods and examples for the functions included in the Teradata Package for Python.

Teradata® Package for Python Function Reference on VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Package for Python
Release Number
20.00.00.03
Published
December 2024
ft:locale
en-US
ft:lastEdition
2024-12-19
dita:id
TeradataPython_FxRef_Lake_2000
Product Category
Teradata Vantage
teradataml.utils.utils.async_run_status = async_run_status(run_ids)
DESCRIPTION:
    Function to check the status of asynchronous run(s)
    using the unique run id(s).
 
 
PARAMETERS:
    run_ids:
        Required Argument.
        Specifies the unique identifier(s) of the asynchronous run.
        Types: str OR list of Strings (str)
 
RETURNS:
    Pandas DataFrame with columns as below:
        * Run Id: Unique identifier of the asynchronous run.
        * Run Description: Description of the asynchronous run.
        * Status: Status of the asynchronous run.
        * Timestamp: Timestamp for 'status'.
        * Additional Details: Addition information of the asynchronous run.
 
 
RAISES:
    None
 
EXAMPLES:
    # Examples to showcase the status of asynchronous run ids for OpenAF.
 
    # Example 1: Get the status of an environment that has been removed asynchronously.
    >>> env = create_env("testenv1", "python_3.7.13","test env 1")
    User environment 'testenv1' created.
    >>> remove_env("testenv1", 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('1ba43e0a-4285-41e1-8738-5f8895c180ee') or get_env('testenv1').status('1ba43e0a-4285-41e1-8738-5f8895c180ee')
    '1ba43e0a-4285-41e1-8738-5f8895c180ee'
    >>> async_run_status('1ba43e0a-4285-41e1-8738-5f8895c180ee')
                                     Run Id                      Run Description    Status             Timestamp Additional Details
    0  1ba43e0a-4285-41e1-8738-5f8895c180ee  Remove 'testenv1' user environment.   Started  2023-08-31T09:27:06Z
    1  1ba43e0a-4285-41e1-8738-5f8895c180ee  Remove 'testenv1' user environment.  Finished  2023-08-31T09:27:07Z
 
    # Example 2: Get the status of multiple asynchronous run ids for removed environments.
    >>> env1 = create_env("testenv1", "python_3.7.13","test env 1")
    >>> env2 = create_env("testenv2", "python_3.7.13","test env 2")
    User environment 'testenv1' created.
    User environment 'testenv2' created.
 
    # Remove 'testenv1' environment asynchronously.
    >>> remove_env("testenv1", 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('24812988-b124-45c7-80b1-6a4a826dc110') or get_env('testenv1').status('24812988-b124-45c7-80b1-6a4a826dc110')
    '24812988-b124-45c7-80b1-6a4a826dc110'
 
    # Remove 'testenv2' environment asynchronously.
    >>> remove_env("testenv2", 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('f686d756-58bb-448b-81e2-979155cb8140') or get_env('testenv2').status('f686d756-58bb-448b-81e2-979155cb8140')
    'f686d756-58bb-448b-81e2-979155cb8140'
 
    # Check the status of claim IDs for asynchronously installed libraries and removed environments.
    >>> async_run_status(['24812988-b124-45c7-80b1-6a4a826dc110', 'f686d756-58bb-448b-81e2-979155cb8140'])
                                      Run Id                           Run Description        Status                   Timestamp    Additional Details
    0       24812988-b124-45c7-80b1-6a4a826dc110    Remove 'testenv1' user environment.      Started        2023-08-31T04:00:44Z
    1       24812988-b124-45c7-80b1-6a4a826dc110    Remove 'testenv1' user environment.     Finished        2023-08-31T04:00:45Z
    2       f686d756-58bb-448b-81e2-979155cb8140    Remove 'testenv2' user environment.      Started        2023-08-31T04:00:47Z
    3       f686d756-58bb-448b-81e2-979155cb8140    Remove 'testenv2' user environment.     Finished        2023-08-31T04:00:48Z