Class PropertyGraphHandler


  • public class PropertyGraphHandler
    extends Object
    This class is part of an tutorial that will walk you through how to build a connector for your custom data source. The README for this module (athena-neptune) will guide you through preparing your development environment, modifying this example RecordHandler, building, deploying, and then using your new source in an Athena query.

    More specifically, this class is responsible for providing Athena with actual rows level data from your source. Athena will call readWithConstraint(...) on this class for each 'Split' you generated in NeptuneMetadataHandler.

    For more examples, please see the other connectors in this repository (e.g. athena-cloudwatch, athena-docdb, etc...)

    • Constructor Detail

      • PropertyGraphHandler

        public PropertyGraphHandler​(NeptuneConnection neptuneConnection)
    • Method Detail

      • executeQuery

        public void executeQuery​(ReadRecordsRequest recordsRequest,
                                 QueryStatusChecker queryStatusChecker,
                                 BlockSpiller spiller,
                                 Map<String,​String> configOptions)
                          throws Exception
        Used to read the row data associated with the provided Split.
        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:
        Exception
      • getResponseFromGremlinQuery

        public Object getResponseFromGremlinQuery​(org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource graphTraversalSource,
                                                  String gremlinQuery)
                                           throws ScriptException
        Throws:
        ScriptException