Spigot class - AWS Glue

Spigot class

Writes sample records to a specified destination to help you verify the transformations performed by your AWS Glue job.

Example

We recommend that you use the DynamicFrame.spigot() method to write a subset of records from a DynamicFrame to a specified destination. To view a code example, see Example: Use spigot to write sample fields from a DynamicFrame to Amazon S3.

Methods

__call__(frame, path, options, transformation_ctx = "")

Writes sample records to a specified destination during a transformation.

  • frame – The DynamicFrame to spigot (required).

  • path – The path of the destination to write to (required).

  • options – JSON key-value pairs that specify options (optional). The "topk" option specifies that the first k records should be written. The "prob" option specifies the probability (as a decimal) of picking any given record. You use this in selecting records to write.

  • transformation_ctx – A unique string that is used to identify state information (optional).

apply(cls, *args, **kwargs)

Inherited from GlueTransform apply

name(cls)

Inherited from GlueTransform name

describeArgs(cls)

Inherited from GlueTransform describeArgs

describeReturn(cls)

Inherited from GlueTransform describeReturn

describeTransform(cls)

Inherited from GlueTransform describeTransform

describeErrors(cls)

Inherited from GlueTransform describeErrors

describe(cls)

Inherited from GlueTransform describe