Class GoogleDataProtocolAPI


  • public class GoogleDataProtocolAPI
    extends Object
    This class is used to make requests to Google Visualization Data Protocol. The most important method is executeQuery.
    Author:
    fnguyen
    • Field Detail

      • ENCODING

        public static String ENCODING
    • Constructor Detail

      • GoogleDataProtocolAPI

        public GoogleDataProtocolAPI()
    • Method Detail

      • executeQuery

        public org.teiid.translator.google.api.result.RowsResult executeQuery​(org.teiid.translator.google.api.metadata.SpreadsheetInfo info,
                                                                              String worksheetTitle,
                                                                              String query,
                                                                              int batchSize,
                                                                              Integer offset,
                                                                              Integer limit)
        Most important method that will issue query [1] to specific worksheet. The columns in the query should be identified by their real alphabetic name (A, B, C...). There is one important restriction to query. It should not contain offset and limit clauses. To achieve functionality of offset and limit please use corresponding parameters in this method. [1] https://developers.google.com/chart/interactive/docs/querylanguage
        Parameters:
        info - The google spreadsheetInfo
        worksheetTitle - The spreadsheet title
        query - The query defined in [1]
        batchSize - How big portions of data should be returned by one roundtrip to Google.
        offset - The offset to use, if not null
        limit - The limit to use, if not null
        Returns:
        Iterable RowsResult that will actually perform the roundtrips to Google for data
      • getMetadata

        public List<org.teiid.translator.google.api.metadata.Column> getMetadata​(String key,
                                                                                 String worksheetTitle)