GlueTransform base class - Amazon Glue
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

GlueTransform base class

The base class that all the awsglue.transforms classes inherit from.

The classes all define a __call__ method. They either override the GlueTransform class methods listed in the following sections, or they are called using the class name by default.

Methods

apply(cls, *args, **kwargs)

Applies the transform by calling the transform class, and returns the result.

  • cls – The self class object.

name(cls)

Returns the name of the derived transform class.

  • cls – The self class object.

describeArgs(cls)

  • cls – The self class object.

Returns a list of dictionaries, each corresponding to a named argument, in the following format:

[ { "name": "(name of argument)", "type": "(type of argument)", "description": "(description of argument)", "optional": "(Boolean, True if the argument is optional)", "defaultValue": "(Default value string, or None)(String; the default value, or None)" }, ... ]

Raises a NotImplementedError exception when called in a derived transform where it is not implemented.

describeReturn(cls)

  • cls – The self class object.

Returns a dictionary with information about the return type, in the following format:

{ "type": "(return type)", "description": "(description of output)" }

Raises a NotImplementedError exception when called in a derived transform where it is not implemented.

describeTransform(cls)

Returns a string describing the transform.

  • cls – The self class object.

Raises a NotImplementedError exception when called in a derived transform where it is not implemented.

describeErrors(cls)

  • cls – The self class object.

Returns a list of dictionaries, each describing a possible exception thrown by this transform, in the following format:

[ { "type": "(type of error)", "description": "(description of error)" }, ... ]

describe(cls)

  • cls – The self class object.

Returns an object with the following format:

{ "transform" : { "name" : cls.name( ), "args" : cls.describeArgs( ), "returns" : cls.describeReturn( ), "raises" : cls.describeErrors( ), "location" : "internal" } }