Class RedshiftMetadataHandler
- java.lang.Object
-
- com.amazonaws.athena.connector.lambda.handlers.MetadataHandler
-
- com.amazonaws.athena.connectors.jdbc.manager.JdbcMetadataHandler
-
- com.amazonaws.athena.connectors.postgresql.PostGreSqlMetadataHandler
-
- com.amazonaws.athena.connectors.redshift.RedshiftMetadataHandler
-
- All Implemented Interfaces:
com.amazonaws.services.lambda.runtime.RequestStreamHandler
public class RedshiftMetadataHandler extends PostGreSqlMetadataHandler
Handles metadata for PostGreSql. User must have access to `schemata`, `tables`, `columns`, `partitions` tables in information_schema.
-
-
Field Summary
-
Fields inherited from class com.amazonaws.athena.connectors.postgresql.PostGreSqlMetadataHandler
ALL_PARTITIONS, BLOCK_PARTITION_COLUMN_NAME, BLOCK_PARTITION_SCHEMA_COLUMN_NAME, GET_PARTITIONS_QUERY, JDBC_PROPERTIES, NON_DEFAULT_COLLATE
-
Fields inherited from class com.amazonaws.athena.connectors.jdbc.manager.JdbcMetadataHandler
caseResolver, jdbcQueryPassthrough, TABLES_AND_VIEWS
-
Fields inherited from class com.amazonaws.athena.connector.lambda.handlers.MetadataHandler
configOptions, DISABLE_SPILL_ENCRYPTION, KMS_KEY_ID_ENV, SPILL_BUCKET_ENV, SPILL_PREFIX_ENV
-
-
Constructor Summary
Constructors Constructor Description RedshiftMetadataHandler(DatabaseConnectionConfig databaseConnectionConfig, Map<String,String> configOptions)
RedshiftMetadataHandler(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 GetDataSourceCapabilitiesResponse
doGetDataSourceCapabilities(BlockAllocator allocator, GetDataSourceCapabilitiesRequest request)
Used to describe the types of capabilities supported by a data source.protected List<TableName>
getPaginatedResults(Connection connection, String databaseName, int token, int limit)
-
Methods inherited from class com.amazonaws.athena.connectors.postgresql.PostGreSqlMetadataHandler
doGetSplits, getArrayArrowTypeFromTypeName, getCharColumns, getPartitions, getPartitionSchema, listPaginatedTables, listTables, wrapNameWithEscapedCharacter
-
Methods inherited from class com.amazonaws.athena.connectors.jdbc.manager.JdbcMetadataHandler
convertDatasourceTypeToArrow, doGetQueryPassthroughSchema, doGetTable, doListSchemaNames, doListTables, escapeNamePattern, getColumns, getCredentialProvider, getJdbcConnectionFactory, getSchema, getSplitClauses, listDatabaseNames, setupQueryPassthroughSplit
-
Methods inherited from class com.amazonaws.athena.connector.lambda.handlers.MetadataHandler
doGetTableLayout, doHandleRequest, doPing, enhancePartitionSchema, getSecret, handleRequest, makeEncryptionKey, makeSpillLocation, onPing, resolveSecrets, resolveWithDefaultCredentials
-
-
-
-
Constructor Detail
-
RedshiftMetadataHandler
public RedshiftMetadataHandler(Map<String,String> configOptions)
Instantiates handler to be used by Lambda function directly. Recommend usingRedshiftMuxCompositeHandler
instead.
-
RedshiftMetadataHandler
public RedshiftMetadataHandler(DatabaseConnectionConfig databaseConnectionConfig, Map<String,String> configOptions)
-
-
Method Detail
-
doGetDataSourceCapabilities
public GetDataSourceCapabilitiesResponse doGetDataSourceCapabilities(BlockAllocator allocator, GetDataSourceCapabilitiesRequest request)
Description copied from class:MetadataHandler
Used to describe the types of capabilities supported by a data source. An engine can use this to determine what portions of the query to push down. A connector that returns any optimization will guarantee that the associated predicate will be pushed down.- Overrides:
doGetDataSourceCapabilities
in classPostGreSqlMetadataHandler
- Parameters:
allocator
- Tool for creating and managing Apache Arrow Blocks.request
- Provides details about the catalog being used.- Returns:
- A GetDataSourceCapabilitiesResponse object which returns a map of supported optimizations that the connector is advertising to the consumer. The connector assumes all responsibility for whatever is passed here.
-
getPaginatedResults
protected List<TableName> getPaginatedResults(Connection connection, String databaseName, int token, int limit) throws SQLException
- Overrides:
getPaginatedResults
in classPostGreSqlMetadataHandler
- Throws:
SQLException
-
-