Spigot 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).

Spigot class

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


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.


__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


Inherited from GlueTransform name


Inherited from GlueTransform describeArgs


Inherited from GlueTransform describeReturn


Inherited from GlueTransform describeTransform


Inherited from GlueTransform describeErrors


Inherited from GlueTransform describe