def transform( event, settings ):
    """
    Takes a pipeline event and transforms it to pipeline event containing
    an array of payloads
    """
    adapters = settings.adapters()

    payloads = []
    for index in range( 0, len( adapters ) ):
        outputter = settings.outputters[ index ]

        if not outputter.passthru:
            output = adapters[ index ].dumps( event['record'] )

        else:
            output = adapters[ index ].dumps( event['message'] )

        payloads.append( output )

    return {
        'bookmark': event['bookmark'],
        'payloads': payloads
    }