Class MySqlRecordHandler
- java.lang.Object
-
- com.amazonaws.athena.connector.lambda.handlers.RecordHandler
-
- com.amazonaws.athena.connectors.jdbc.manager.JdbcRecordHandler
-
- com.amazonaws.athena.connectors.mysql.MySqlRecordHandler
-
- All Implemented Interfaces:
com.amazonaws.services.lambda.runtime.RequestStreamHandler
public class MySqlRecordHandler extends JdbcRecordHandler
Data handler, user must have necessary permissions to read from necessary tables.
-
-
Field Summary
Fields Modifier and Type Field Description protected static String
MYSQL_QUOTE_CHARACTER
-
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 MySqlRecordHandler(DatabaseConnectionConfig databaseConnectionConfig, JdbcConnectionFactory jdbcConnectionFactory, Map<String,String> configOptions)
MySqlRecordHandler(DatabaseConnectionConfig databaseConnectionConfig, Map<String,String> configOptions)
MySqlRecordHandler(Map<String,String> configOptions)
Instantiates handler to be used by Lambda function directly.
-
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.-
Methods inherited from class com.amazonaws.athena.connectors.jdbc.manager.JdbcRecordHandler
buildQueryPassthroughSql, getCredentialProvider, getJdbcConnectionFactory, makeExtractor, makeFactory, readWithConstraint
-
Methods inherited from class com.amazonaws.athena.connector.lambda.handlers.RecordHandler
doHandleRequest, doReadRecords, getSecret, getSpillConfig, handleRequest, onPing, resolveSecrets
-
-
-
-
Field Detail
-
MYSQL_QUOTE_CHARACTER
protected static final String MYSQL_QUOTE_CHARACTER
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MySqlRecordHandler
public MySqlRecordHandler(Map<String,String> configOptions)
Instantiates handler to be used by Lambda function directly. Recommend usingMySqlMuxCompositeHandler
instead.
-
MySqlRecordHandler
public MySqlRecordHandler(DatabaseConnectionConfig databaseConnectionConfig, Map<String,String> configOptions)
-
MySqlRecordHandler
public MySqlRecordHandler(DatabaseConnectionConfig databaseConnectionConfig, JdbcConnectionFactory jdbcConnectionFactory, Map<String,String> configOptions)
-
-
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.
-
-