Teradata Package for Python Function Reference on VantageCloud Lake - 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.scriptmgmt.UserEnv.UserEnv.status = status(self, claim_ids=None)
DESCRIPTION:
    Function to check the status of the operations performed by the library/file
    management methods of UserEnv. Status of the following operations can be checked:
      * File installation, when installed asynchronously. Applicable for the files
        with size greater than 10 MB.
      * Install/Uninstall/Update of the libraries in user environment.
 
PARAMETERS:
    claim_ids:
        Optional Argument.
        Specifies the unique identifier(s) of the asynchronous process
        started by the UserEnv management methods.
        If user do not pass claim_ids, then function gets the status
        of all the asynchronus process'es in the current session.
        Types: str OR list of Strings (str)
 
RETURNS:
    Pandas DataFrame.
 
RAISES:
    None
 
EXAMPLES:
    # Create a remote user environment.
    >>> env = create_env('test_env', 'python_3.7.9', 'Test environment')
    User environment test_env created.
 
    # Example 1: Install the file 'large_file' asynchronusly with 'large_file' found in
                 temp folder and check the latest status of installation.
    # Note:
    #     Running this example creates a file 'large_file' with size
    #     approximately 41MB in the temp folder.
    >>> import tempfile, os
    >>> def create_large_file():
    ...     file_name = os.path.join(tempfile.gettempdir(),"large_file")
    ...     with open(file_name, 'xb') as fp:
    ...         fp.seek((1024 * 1024 * 41) - 1)
    ...         fp.write(b' ')
    ...
    >>> claim_id = env.install_file('large_file')
        File installation is initiated. Check the status using status() with the claim id 53e44892-1952-45eb-b828-6635c0447b59.
    >>> env.status(claim_id)
                                   Claim Id                                                       File/Libs   Method Name               Stage             Timestamp Additional Details
    0  53e44892-1952-45eb-b828-6635c0447b59  TeradataToolsAndUtilitiesBase__ubuntu_x8664.17.10.19.00.tar.gz  install_file  Endpoint Generated  2022-07-27T18:20:34Z               None
    1  53e44892-1952-45eb-b828-6635c0447b59  TeradataToolsAndUtilitiesBase__ubuntu_x8664.17.10.19.00.tar.gz  install_file       File Uploaded  2022-07-27T18:20:35Z               None
    2  53e44892-1952-45eb-b828-6635c0447b59  TeradataToolsAndUtilitiesBase__ubuntu_x8664.17.10.19.00.tar.gz  install_file      File Installed  2022-07-27T18:20:38Z               None
    >>>
 
    # Example 2: Install the library 'teradataml' asynchronusly and check the status of installation.
    >>> claim_id = env.install_lib('teradataml')
        Request to install libraries initiated successfully in the remote user environment test_env. Check the status using status() with the claim id '349615e2-9257-4a70-8304-ac76f50712f8'.
    >>> env.status(claim_id)
                                   Claim Id   File/Libs  Method Name     Stage             Timestamp Additional Details
    0  349615e2-9257-4a70-8304-ac76f50712f8  teradataml  install_lib   Started  2022-07-13T10:37:40Z               None
    1  349615e2-9257-4a70-8304-ac76f50712f8  teradataml  install_lib  Finished  2022-07-13T10:39:29Z               None
    >>>
 
    # Example 3: update the library 'teradataml' to 17.10.0.0 asynchronusly and check the status of installation.
    >>> claim_id = env.update_lib('teradataml==17.10.0.0')
    Request to update libraries initiated successfully in the remote user environment test_env. Check the status using status() with the claim id '29d06296-7444-4851-adef-ca1f921b1dd6'.
    >>> env.status(claim_id)
                                   Claim Id              File/Libs Method Name     Stage             Timestamp Additional Details
    0  29d06296-7444-4851-adef-ca1f921b1dd6  teradataml==17.10.0.0  update_lib   Started  2022-07-13T10:47:39Z               None
    1  29d06296-7444-4851-adef-ca1f921b1dd6  teradataml==17.10.0.0  update_lib  Finished  2022-07-13T10:49:52Z               None
    >>>
 
    # Example 4: uninstall the library 'teradataml' and check the complete status of all the asynchronous process'es.
    >>> claim_id = env.uninstall_lib('teradataml')
    Request to uninstall libraries initiated successfully in the remote user environment test_env. Check the status using status() with the claim id '5cd3b3f7-f3b8-4bfd-8abe-7c811a6728db'.
    >>> env.status()
                                   Claim Id                                                       File/Libs    Method Name               Stage             Timestamp Additional Details
    0  53e44892-1952-45eb-b828-6635c0447b59  TeradataToolsAndUtilitiesBase__ubuntu_x8664.17.10.19.00.tar.gz   install_file  Endpoint Generated  2022-07-27T18:20:34Z               None
    1  53e44892-1952-45eb-b828-6635c0447b59  TeradataToolsAndUtilitiesBase__ubuntu_x8664.17.10.19.00.tar.gz   install_file       File Uploaded  2022-07-27T18:20:35Z               None
    2  53e44892-1952-45eb-b828-6635c0447b59  TeradataToolsAndUtilitiesBase__ubuntu_x8664.17.10.19.00.tar.gz   install_file      File Installed  2022-07-27T18:20:38Z               None
    3  29d06296-7444-4851-adef-ca1f921b1dd6                                           teradataml==17.10.0.0     update_lib             Started  2022-07-13T10:47:39Z               None
    4  29d06296-7444-4851-adef-ca1f921b1dd6                                           teradataml==17.10.0.0     update_lib            Finished  2022-07-13T10:49:52Z               None
    5  349615e2-9257-4a70-8304-ac76f50712f8                                           teradataml               install_lib             Started  2022-07-13T10:37:40Z               None
    6  349615e2-9257-4a70-8304-ac76f50712f8                                           teradataml               install_lib            Finished  2022-07-13T10:39:29Z               None
    7  5cd3b3f7-f3b8-4bfd-8abe-7c811a6728db                                           teradataml             uninstall_lib             Started  2022-07-13T10:37:40Z               None
    8  5cd3b3f7-f3b8-4bfd-8abe-7c811a6728db                                           teradataml             uninstall_lib            Finished  2022-07-13T10:39:29Z               None