Class DynamoDBRecordHandler
- java.lang.Object
-
- com.amazonaws.athena.connector.lambda.handlers.RecordHandler
-
- com.amazonaws.athena.connectors.dynamodb.DynamoDBRecordHandler
-
- All Implemented Interfaces:
com.amazonaws.services.lambda.runtime.RequestStreamHandler
public class DynamoDBRecordHandler extends RecordHandler
Handles data read record requests for the Athena DynamoDB Connector.For more detail, please see the module's README.md, some notable characteristics of this class include:
1. Reads and maps DynamoDB data for a specific split. The split can either represent a single hash key or a table scan segment.
2. Attempts to push down all predicates into DynamoDB to reduce read cost and bytes over the wire.
-
-
Field Summary
-
Fields inherited from class com.amazonaws.athena.connector.lambda.handlers.RecordHandler
configOptions
-
-
Constructor Summary
Constructors Constructor Description DynamoDBRecordHandler(Map<String,String> configOptions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
readWithConstraint(BlockSpiller spiller, ReadRecordsRequest recordsRequest, QueryStatusChecker queryStatusChecker)
Reads data from DynamoDB by submitting either a Query or a Scan, depending on the type of split, and includes any filters specified in the split.-
Methods inherited from class com.amazonaws.athena.connector.lambda.handlers.RecordHandler
doHandleRequest, doReadRecords, getSecret, getSpillConfig, handleRequest, onPing, resolveSecrets
-
-
-
-
Method Detail
-
readWithConstraint
protected void readWithConstraint(BlockSpiller spiller, ReadRecordsRequest recordsRequest, QueryStatusChecker queryStatusChecker) throws ExecutionException
Reads data from DynamoDB by submitting either a Query or a Scan, depending on the type of split, and includes any filters specified in the split.- Specified by:
readWithConstraint
in classRecordHandler
- Parameters:
spiller
- A BlockSpiller that should be used to write the row data associated with this Split. The BlockSpiller automatically handles chunking the response, encrypting, and spilling to S3.recordsRequest
- Details of the read request, including: 1. The Split 2. The Catalog, Database, and Table the read request is for. 3. The filtering predicate (if any) 4. The columns required for projection.queryStatusChecker
- A QueryStatusChecker that you can use to stop doing work for a query that has already terminated- Throws:
ExecutionException
- See Also:
RecordHandler
-
-