Package org.teiid.google.dataprotocol
Class GoogleDataProtocolAPI
- java.lang.Object
-
- org.teiid.google.dataprotocol.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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
GoogleDataProtocolAPI.DataProtocolQueryStrategy
Logic to query portion of data from Google Visualization Data Protocol.
-
Constructor Summary
Constructors Constructor Description GoogleDataProtocolAPI()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RowsResult
executeQuery(String spreadsheetKey, String worksheetTitle, String query, int batchSize, Integer offset, Integer limit)
Most important method that will issue query [1] to specific worksheet.AuthHeaderFactory
getHeaderFactory()
List<Column>
getMetadata(String key, String worksheetTitle)
void
setHeaderFactory(AuthHeaderFactory headerFactory)
-
-
-
Field Detail
-
ENCODING
public static String ENCODING
-
-
Method Detail
-
getHeaderFactory
public AuthHeaderFactory getHeaderFactory()
-
setHeaderFactory
public void setHeaderFactory(AuthHeaderFactory headerFactory)
-
executeQuery
public RowsResult executeQuery(String spreadsheetKey, 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:
query
- The query defined in [1]batchSize
- How big portions of data should be returned by one roundtrip to Google.- Returns:
- Iterable RowsResult that will actually perform the roundtrips to Google for data
-
-