Class LambdaMetadataProvider
- java.lang.Object
-
- com.amazonaws.athena.connector.validation.LambdaMetadataProvider
-
public class LambdaMetadataProvider extends Object
This class offers multiple convenience methods to retrieve metadata from a deployed Lambda.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static GetSplitsResponse
getSplits(String catalog, TableName tableName, Constraints constraints, Block partitions, List<String> partitionCols, String contToken, String metadataFunction, FederatedIdentity identity)
This method builds and executes a GetSplitsRequest against the specified Lambda function.static GetTableResponse
getTable(String catalog, TableName tableName, String metadataFunction, FederatedIdentity identity)
This method builds and executes a GetTableRequest against the specified Lambda function.static GetTableLayoutResponse
getTableLayout(String catalog, TableName tableName, Constraints constraints, org.apache.arrow.vector.types.pojo.Schema schema, Set<String> partitionCols, String metadataFunction, FederatedIdentity identity)
This method builds and executes a GetTableLayoutRequest against the specified Lambda function.static ListSchemasResponse
listSchemas(String catalog, String metadataFunction, FederatedIdentity identity)
This method builds and executes a ListSchemasRequest against the specified Lambda function.static ListTablesResponse
listTables(String catalog, String schema, String metadataFunction, FederatedIdentity identity)
This method builds and executes a ListTablesRequest against the specified Lambda function.
-
-
-
Method Detail
-
listSchemas
public static ListSchemasResponse listSchemas(String catalog, String metadataFunction, FederatedIdentity identity)
This method builds and executes a ListSchemasRequest against the specified Lambda function.- Parameters:
catalog
- the catalog name to be passed to LambdametadataFunction
- the name of the Lambda function to callidentity
- the identity of the caller- Returns:
- the response
-
listTables
public static ListTablesResponse listTables(String catalog, String schema, String metadataFunction, FederatedIdentity identity)
This method builds and executes a ListTablesRequest against the specified Lambda function.- Parameters:
catalog
- the catalog name to be passed to Lambdaschema
- the name of the contextual schema for the requestmetadataFunction
- the name of the Lambda function to callidentity
- the identity of the caller- Returns:
- the response
-
getTable
public static GetTableResponse getTable(String catalog, TableName tableName, String metadataFunction, FederatedIdentity identity)
This method builds and executes a GetTableRequest against the specified Lambda function.- Parameters:
catalog
- the catalog name to be passed to LambdatableName
- the schema-qualified table name indicating which table should be retrievedmetadataFunction
- the name of the Lambda function to callidentity
- the identity of the caller- Returns:
- the response
-
getTableLayout
public static GetTableLayoutResponse getTableLayout(String catalog, TableName tableName, Constraints constraints, org.apache.arrow.vector.types.pojo.Schema schema, Set<String> partitionCols, String metadataFunction, FederatedIdentity identity)
This method builds and executes a GetTableLayoutRequest against the specified Lambda function.- Parameters:
catalog
- the catalog name to be passed to LambdatableName
- the schema-qualified table name indicating the table whose layout should be retrievedconstraints
- the constraints to be applied to the requestschema
- the schema of the table in questionpartitionCols
- the partition column names for the table in questionmetadataFunction
- the name of the Lambda function to callidentity
- the identity of the caller- Returns:
- the response
-
getSplits
public static GetSplitsResponse getSplits(String catalog, TableName tableName, Constraints constraints, Block partitions, List<String> partitionCols, String contToken, String metadataFunction, FederatedIdentity identity)
This method builds and executes a GetSplitsRequest against the specified Lambda function.- Parameters:
catalog
- the catalog name to be passed to LambdatableName
- the schema-qualified table name indicating the table for which splits should be retrievedconstraints
- the constraints to be applied to the requestpartitions
- the block of partitions to be provided with the requestpartitionCols
- the partition column names for the table in questioncontToken
- a continuation token to be provided with the request, or nullmetadataFunction
- the name of the Lambda function to callidentity
- the identity of the caller- Returns:
- the response
-
-