Class LambdaMetadataProvider


  • public class LambdaMetadataProvider
    extends Object
    This class offers multiple convenience methods to retrieve metadata from a deployed Lambda.
    • 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 Lambda
        metadataFunction - the name of the Lambda function to call
        identity - 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 Lambda
        schema - the name of the contextual schema for the request
        metadataFunction - the name of the Lambda function to call
        identity - 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 Lambda
        tableName - the schema-qualified table name indicating which table should be retrieved
        metadataFunction - the name of the Lambda function to call
        identity - 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 Lambda
        tableName - the schema-qualified table name indicating the table whose layout should be retrieved
        constraints - the constraints to be applied to the request
        schema - the schema of the table in question
        partitionCols - the partition column names for the table in question
        metadataFunction - the name of the Lambda function to call
        identity - 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 Lambda
        tableName - the schema-qualified table name indicating the table for which splits should be retrieved
        constraints - the constraints to be applied to the request
        partitions - the block of partitions to be provided with the request
        partitionCols - the partition column names for the table in question
        contToken - a continuation token to be provided with the request, or null
        metadataFunction - the name of the Lambda function to call
        identity - the identity of the caller
        Returns:
        the response