Reputation: 84
I am trying to execute query from Athena to show data from Neptune database. I am using Athena Neptune connector to connect to Neptune DB and show the data in Athena query editor.
However I get error when I run the following query
SELECT * FROM "datasource/datacatalog".<dbname>.<tablename> limit 10;
Error Message:
Encountered an exception[java.lang.NullPointerException] from your LambdaFunction[neptune_connector lambda function name] executed in context[S3SpillLocation{bucket='S3 bucketname', key='<file prefix name/2e6fedb0-9366-4d83-8a69-20472d7ff850/', directory=true}]
I have done so far.
References:
However I am able to see table info when I run the following query but the actual select query does not work.
describe `datasource/datacatlogname`.<dbname>.<tablename>;
Cloudwatch logs:
java.lang.NullPointerException: java.lang.NullPointerException
java.lang.NullPointerException at
com.amazonaws.athena.connectors.neptune.propertygraph.PropertyGraphHandler.executeQuery(PropertyGraphHandler.java:112)
at
com.amazonaws.athena.connectors.neptune.NeptuneRecordHandler.readWithConstraint(NeptuneRecordHandler.java:113)
at
com.amazonaws.athena.connector.lambda.handlers.RecordHandler.doReadRecords(RecordHandler.java:19 at
com.amazonaws.athena.connector.lambda.handlers.RecordHandler.doHandleRequest(RecordHandler.java:158)
at
com.amazonaws.athena.connector.lambda.handlers.CompositeHandler.handleRequest(CompositeHandler.java:138)
at
com.amazonaws.athena.connector.lambda.handlers.CompositeHandler.handleRequest(CompositeHandler.java:103)
Upvotes: 0
Views: 722
Reputation: 84
I was able to find out the issue. When I was creating the table manually in console I was inserting separatorChar and componenttype under Serde parameters.
It should be under table properties.
Upvotes: 0
Reputation: 26
Check if the lambda configuration is setup properly to access the Neptune database. Make sure the lambda security group attached is properly setup to access the database
The connector is available in Serverless Application Reppository, try deploying from there
Upvotes: 0