Map class
Builds a new DynamicFrame by applying a function to all records in the input
DynamicFrame.
Example
We recommend that you use the DynamicFrame.map() method to apply a function
to all records in a DynamicFrame. To view a code example, see Example: Use map to apply a function to every record in a DynamicFrame.
Methods
__call__(frame, f, transformation_ctx="", info="", stageThreshold=0, totalThreshold=0)
Returns a new DynamicFrame that results from applying the specified function to
all DynamicRecords in the original DynamicFrame.
frame– The originalDynamicFrameto apply the mapping function to (required).-
f– The function to apply to allDynamicRecordsin theDynamicFrame. The function must take aDynamicRecordas an argument and return a newDynamicRecordthat is produced by the mapping (required).A
DynamicRecordrepresents a logical record in aDynamicFrame. It's similar to a row in an Apache SparkDataFrame, except that it is self-describing and can be used for data that doesn't conform to a fixed schema. transformation_ctx– A unique string that is used to identify state information (optional).info– A string associated with errors in the transformation (optional).stageThreshold– The maximum number of errors that can occur in the transformation before it errors out (optional). The default is zero.totalThreshold– The maximum number of errors that can occur overall before processing errors out (optional). The default is zero.
Returns a new DynamicFrame that results from applying the specified function to
all DynamicRecords in the original DynamicFrame.
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.