Class SynapseRecordHandler
- java.lang.Object
-
- com.amazonaws.athena.connector.lambda.handlers.RecordHandler
-
- com.amazonaws.athena.connectors.jdbc.manager.JdbcRecordHandler
-
- com.amazonaws.athena.connectors.synapse.SynapseRecordHandler
-
- All Implemented Interfaces:
com.amazonaws.services.lambda.runtime.RequestStreamHandler
public class SynapseRecordHandler extends JdbcRecordHandler
-
-
Field Summary
-
Fields inherited from class com.amazonaws.athena.connectors.jdbc.manager.JdbcRecordHandler
queryPassthrough
-
Fields inherited from class com.amazonaws.athena.connector.lambda.handlers.RecordHandler
configOptions
-
-
Constructor Summary
Constructors Constructor Description SynapseRecordHandler(DatabaseConnectionConfig databaseConnectionConfig, Map<String,String> configOptions)
SynapseRecordHandler(Map<String,String> configOptions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PreparedStatement
buildSplitSql(Connection jdbcConnection, String catalogName, TableName tableName, org.apache.arrow.vector.types.pojo.Schema schema, Constraints constraints, Split split)
Builds split SQL string and returns prepared statement.void
readWithConstraint(BlockSpiller blockSpiller, ReadRecordsRequest readRecordsRequest, QueryStatusChecker queryStatusChecker)
A more stream lined option for reading the row data associated with the provided Split.-
Methods inherited from class com.amazonaws.athena.connectors.jdbc.manager.JdbcRecordHandler
buildQueryPassthroughSql, getCredentialProvider, getJdbcConnectionFactory, makeExtractor, makeFactory
-
Methods inherited from class com.amazonaws.athena.connector.lambda.handlers.RecordHandler
doHandleRequest, doReadRecords, getSecret, getSpillConfig, handleRequest, onPing, resolveSecrets
-
-
-
-
Method Detail
-
buildSplitSql
public PreparedStatement buildSplitSql(Connection jdbcConnection, String catalogName, TableName tableName, org.apache.arrow.vector.types.pojo.Schema schema, Constraints constraints, Split split) throws SQLException
Description copied from class:JdbcRecordHandler
Builds split SQL string and returns prepared statement.- Specified by:
buildSplitSql
in classJdbcRecordHandler
- Parameters:
jdbcConnection
- jdbc connection. SeeConnection
catalogName
- Athena provided catalog name.tableName
- database table name.schema
- table schema.constraints
- constraints to push down to the database.split
- table split.- Returns:
- prepared statement with sql. See
PreparedStatement
- Throws:
SQLException
- JDBC database exception.
-
readWithConstraint
public void readWithConstraint(BlockSpiller blockSpiller, ReadRecordsRequest readRecordsRequest, QueryStatusChecker queryStatusChecker) throws Exception
Description copied from class:RecordHandler
A more stream lined option for reading the row data associated with the provided Split. This method differs from doReadRecords(...) in that the SDK handles more of the request lifecycle, leaving you to focus more closely on the task of actually reading from your source.- Overrides:
readWithConstraint
in classJdbcRecordHandler
- Parameters:
blockSpiller
- 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.readRecordsRequest
- 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
-
-