Interface DataFetcher

  • All Known Implementing Classes:
    GoogleSheetsDataFetcher
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface DataFetcher
    Fetches a spreadsheet and parses it into a table schema and associated metadata.
    • Method Detail

      • fetchDocumentSheet

        DataFetcher.Result fetchDocumentSheet​(CredentialFetcher credentialFetcher,
                                              String documentId,
                                              String sheetRange,
                                              String schema)
        Fetches a Google spreadsheet.
        Parameters:
        credentialFetcher - Wraps credentials needed to access Google APIs.
        documentId - The Google document ID to fetch.
        sheetRange - The spreadsheet range: 'SheetName!A1:G11'
        schema - The schema name where data will be stored in the database.
        Returns:
        A result object containg the table schema and associated data.