AWS Glue

2020/06/03 - AWS Glue - 2 updated api methods

Changes  Update glue client to latest version

GetUserDefinedFunction (updated) Link ¶
Changes (response)
{'UserDefinedFunction': {'DatabaseName': 'string'}}

Retrieves a specified function definition from the Data Catalog.

See also: AWS API Documentation

Request Syntax

client.get_user_defined_function(
    CatalogId='string',
    DatabaseName='string',
    FunctionName='string'
)
type CatalogId

string

param CatalogId

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

type DatabaseName

string

param DatabaseName

[REQUIRED]

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

type FunctionName

string

param FunctionName

[REQUIRED]

The name of the function.

rtype

dict

returns

Response Syntax

{
    'UserDefinedFunction': {
        'FunctionName': 'string',
        'DatabaseName': 'string',
        'ClassName': 'string',
        'OwnerName': 'string',
        'OwnerType': 'USER'|'ROLE'|'GROUP',
        'CreateTime': datetime(2015, 1, 1),
        'ResourceUris': [
            {
                'ResourceType': 'JAR'|'FILE'|'ARCHIVE',
                'Uri': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • UserDefinedFunction (dict) --

      The requested function definition.

      • FunctionName (string) --

        The name of the function.

      • DatabaseName (string) --

        The name of the database where the function resides.

      • ClassName (string) --

        The Java class that contains the function code.

      • OwnerName (string) --

        The owner of the function.

      • OwnerType (string) --

        The owner type.

      • CreateTime (datetime) --

        The time at which the function was created.

      • ResourceUris (list) --

        The resource URIs for the function.

        • (dict) --

          The URIs for function resources.

          • ResourceType (string) --

            The type of the resource.

          • Uri (string) --

            The URI for accessing the resource.

GetUserDefinedFunctions (updated) Link ¶
Changes (response)
{'UserDefinedFunctions': {'DatabaseName': 'string'}}

Retrieves multiple function definitions from the Data Catalog.

See also: AWS API Documentation

Request Syntax

client.get_user_defined_functions(
    CatalogId='string',
    DatabaseName='string',
    Pattern='string',
    NextToken='string',
    MaxResults=123
)
type CatalogId

string

param CatalogId

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

type DatabaseName

string

param DatabaseName

The name of the catalog database where the functions are located. If none is provided, functions from all the databases across the catalog will be returned.

type Pattern

string

param Pattern

[REQUIRED]

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

type NextToken

string

param NextToken

A continuation token, if this is a continuation call.

type MaxResults

integer

param MaxResults

The maximum number of functions to return in one response.

rtype

dict

returns

Response Syntax

{
    'UserDefinedFunctions': [
        {
            'FunctionName': 'string',
            'DatabaseName': 'string',
            'ClassName': 'string',
            'OwnerName': 'string',
            'OwnerType': 'USER'|'ROLE'|'GROUP',
            'CreateTime': datetime(2015, 1, 1),
            'ResourceUris': [
                {
                    'ResourceType': 'JAR'|'FILE'|'ARCHIVE',
                    'Uri': 'string'
                },
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • UserDefinedFunctions (list) --

      A list of requested function definitions.

      • (dict) --

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

        • FunctionName (string) --

          The name of the function.

        • DatabaseName (string) --

          The name of the database where the function resides.

        • ClassName (string) --

          The Java class that contains the function code.

        • OwnerName (string) --

          The owner of the function.

        • OwnerType (string) --

          The owner type.

        • CreateTime (datetime) --

          The time at which the function was created.

        • ResourceUris (list) --

          The resource URIs for the function.

          • (dict) --

            The URIs for function resources.

            • ResourceType (string) --

              The type of the resource.

            • Uri (string) --

              The URI for accessing the resource.

    • NextToken (string) --

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