Class TPCDSRecordHandler

  • All Implemented Interfaces:
    com.amazonaws.services.lambda.runtime.RequestStreamHandler

    public class TPCDSRecordHandler
    extends RecordHandler
    Handles data read record requests for the Athena TPC-DS Connector.

    For more detail, please see the module's README.md, some notable characteristics of this class include:

    1. Generates data for the requested table on the fly. 2. Applies constraints to the data as it is generated, emulating predicate-pushdown.

    • Constructor Detail

      • TPCDSRecordHandler

        public TPCDSRecordHandler​(Map<String,​String> configOptions)
      • TPCDSRecordHandler

        protected TPCDSRecordHandler​(software.amazon.awssdk.services.s3.S3Client amazonS3,
                                     software.amazon.awssdk.services.secretsmanager.SecretsManagerClient secretsManager,
                                     software.amazon.awssdk.services.athena.AthenaClient athena,
                                     Map<String,​String> configOptions)
    • Method Detail

      • readWithConstraint

        protected void readWithConstraint​(BlockSpiller spiller,
                                          ReadRecordsRequest recordsRequest,
                                          QueryStatusChecker queryStatusChecker)
                                   throws IOException
        Generated TPCDS data for the given Table and scale factor as defined by the requested Split.
        Specified by:
        readWithConstraint in class RecordHandler
        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:
        IOException
        See Also:
        RecordHandler