Skip to main content
  • alterEnvironment

    public AlterEnvironmentResponse alterEnvironment(AlterEnvironmentRequest request) throws GPUdbException
    Alters an existing environment which can be referenced by a user-defined function (UDF).
    Parameters:
    request - Request object containing the parameters for the operation.
    Returns:
    Response object containing the results of the operation.
    Throws:
    GPUdbException - if an error occurs during the operation.
  • alterEnvironment

    public AlterEnvironmentResponse alterEnvironment(String environmentName, String action, String value, Map<String,String> options) throws GPUdbException
    Alters an existing environment which can be referenced by a user-defined function (UDF).
    Parameters:
    environmentName - Name of the environment to be altered.
    action - Modification operation to be applied. Supported values:
    • INSTALL_PACKAGE: Install a python package from PyPI, an external data source or KiFS.
    • INSTALL_REQUIREMENTS: Install packages from a requirements file.
    • UNINSTALL_PACKAGE: Uninstall a python package.
    • UNINSTALL_REQUIREMENTS: Uninstall packages from a requirements file.
    • RESET: Uninstalls all packages in the environment and resets it to the original state at time of creation.
    • REBUILD: Recreates the environment and re-installs all packages, upgrades the packages if necessary based on dependencies.
    value - The value of the modification, depending on action. For example, if action is INSTALL_PACKAGE, this would be the python package name. If action is INSTALL_REQUIREMENTS, this would be the path of a requirements file from which to install packages. If an external data source is specified in DATASOURCE_NAME, this can be the path to a wheel file or source archive. Alternatively, if installing from a file (wheel or source archive), the value may be a reference to a file in KiFS.
    options - Optional parameters.
    • DATASOURCE_NAME: Name of an existing external data source from which packages specified in value can be loaded.
    The default value is an empty Map.
    Returns:
    Response object containing the results of the operation.
    Throws:
    GPUdbException - if an error occurs during the operation.