Menu
AWS Glue
Developer Guide

User-Defined Function API

Data Types

UserDefinedFunction Structure

Represents the equivalent of a Hive user-defined function (UDF) definition.

Fields

  • FunctionName – String, matching the Single-line string pattern.

    The name of the function.

  • ClassName – String, matching the Single-line string pattern.

    The Java class that contains the function code.

  • OwnerName – String, matching the Single-line string pattern.

    The owner of the function.

  • OwnerType – String (valid values: USER | ROLE | GROUP).

    The owner type.

  • CreateTime – Timestamp.

    The time at which the function was created.

  • ResourceUris – An array of ResourceUris.

    The resource URIs for the function.

UserDefinedFunctionInput Structure

A structure used to create or updata a user-defined function.

Fields

  • FunctionName – String, matching the Single-line string pattern.

    The name of the function.

  • ClassName – String, matching the Single-line string pattern.

    The Java class that contains the function code.

  • OwnerName – String, matching the Single-line string pattern.

    The owner of the function.

  • OwnerType – String (valid values: USER | ROLE | GROUP).

    The owner type.

  • ResourceUris – An array of ResourceUris.

    The resource URIs for the function.

Operations

CreateUserDefinedFunction Action (Python: create_user_defined_function)

Creates a new function definition in the Data Catalog.

Request

  • CatalogId – Catalog id string, matching the Single-line string pattern.

    The ID of the Data Catalog in which to create the function. If none is supplied, the AWS account ID is used by default.

  • DatabaseName – String, matching the Single-line string pattern. Required.

    The name of the catalog database in which to create the function.

  • FunctionInput – An UserDefinedFunctionInput object. Required.

    A FunctionInput object that defines the function to create in the Data Catalog.

Response

  • No Response parameters.

Errors

  • AlreadyExistsException

  • InvalidInputException

  • InternalServiceException

  • EntityNotFoundException

  • OperationTimeoutException

  • ResourceNumberLimitExceededException

UpdateUserDefinedFunction Action (Python: update_user_defined_function)

Updates an existing function definition in the Data Catalog.

Request

  • CatalogId – Catalog id string, matching the Single-line string pattern.

    The ID of the Data Catalog where the function to be updated is located. If none is supplied, the AWS account ID is used by default.

  • DatabaseName – String, matching the Single-line string pattern. Required.

    The name of the catalog database where the function to be updated is located.

  • FunctionName – String, matching the Single-line string pattern. Required.

    The name of the function.

  • FunctionInput – An UserDefinedFunctionInput object. Required.

    A FunctionInput object that re-defines the function in the Data Catalog.

Response

  • No Response parameters.

Errors

  • EntityNotFoundException

  • InvalidInputException

  • InternalServiceException

  • OperationTimeoutException

DeleteUserDefinedFunction Action (Python: delete_user_defined_function)

Deletes an existing function definition from the Data Catalog.

Request

  • CatalogId – Catalog id string, matching the Single-line string pattern.

    The ID of the Data Catalog where the function to be deleted is located. If none is supplied, the AWS account ID is used by default.

  • DatabaseName – String, matching the Single-line string pattern. Required.

    The name of the catalog database where the function is located.

  • FunctionName – String, matching the Single-line string pattern. Required.

    The name of the function definition to be deleted.

Response

  • No Response parameters.

Errors

  • EntityNotFoundException

  • InvalidInputException

  • InternalServiceException

  • OperationTimeoutException

GetUserDefinedFunction Action (Python: get_user_defined_function)

Retrieves a specified function definition from the Data Catalog.

Request

  • CatalogId – Catalog id string, matching the Single-line string pattern.

    The ID of the Data Catalog where the function to be retrieved is located. If none is supplied, the AWS account ID is used by default.

  • DatabaseName – String, matching the Single-line string pattern. Required.

    The name of the catalog database where the function is located.

  • FunctionName – String, matching the Single-line string pattern. Required.

    The name of the function.

Response

  • UserDefinedFunction – An UserDefinedFunction object.

    The requested function definition.

Errors

  • EntityNotFoundException

  • InvalidInputException

  • InternalServiceException

  • OperationTimeoutException

GetUserDefinedFunctions Action (Python: get_user_defined_functions)

Retrieves a multiple function definitions from the Data Catalog.

Request

  • CatalogId – Catalog id string, matching the Single-line string pattern.

    The ID of the Data Catalog where the functions to be retrieved are located. If none is supplied, the AWS account ID is used by default.

  • DatabaseName – String, matching the Single-line string pattern. Required.

    The name of the catalog database where the functions are located.

  • Pattern – String, matching the Single-line string pattern. Required.

    An optional function-name pattern string that filters the function definitions returned.

  • NextToken – String.

    A continuation token, if this is a continuation call.

  • MaxResults – Number (integer).

    The maximum number of functions to return in one response.

Response

  • UserDefinedFunctions – An array of UserDefinedFunctions.

    A list of requested function definitions.

  • NextToken – String.

    A continuation token, if the list of functions returned does not include the last requested function.

Errors

  • EntityNotFoundException

  • InvalidInputException

  • OperationTimeoutException

  • InternalServiceException