Package org.teiid.translator.google
Class SpreadsheetExecutionFactory
- java.lang.Object
-
- org.teiid.translator.ExecutionFactory<ConnectionFactory,GoogleSpreadsheetConnection>
-
- org.teiid.translator.google.SpreadsheetExecutionFactory
-
@Translator(name="google-spreadsheet", description="A translator for Google Spreadsheet") public class SpreadsheetExecutionFactory extends ExecutionFactory<ConnectionFactory,GoogleSpreadsheetConnection>
Translator that is used to translate SQL to Google spreadsheet API. Translator uses Google Visualization API and Google Data API.- Author:
- felias
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.teiid.translator.ExecutionFactory
ExecutionFactory.Format, ExecutionFactory.NullOrder, ExecutionFactory.SupportedJoinCriteria, ExecutionFactory.TransactionSupport
-
-
Field Summary
Fields Modifier and Type Field Description static BundleUtil
UTIL
-
Fields inherited from class org.teiid.translator.ExecutionFactory
DEFAULT_MAX_FROM_GROUPS, DEFAULT_MAX_IN_CRITERIA_SIZE, DEFAULT_MAX_PROJECTED_COLUMNS
-
-
Constructor Summary
Constructors Constructor Description SpreadsheetExecutionFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ProcedureExecution
createDirectExecution(List<Argument> arguments, Command command, ExecutionContext executionContext, RuntimeMetadata metadata, GoogleSpreadsheetConnection connection)
ProcedureExecution
createProcedureExecution(Call command, ExecutionContext executionContext, RuntimeMetadata metadata, GoogleSpreadsheetConnection connection)
ResultSetExecution
createResultSetExecution(QueryExpression command, ExecutionContext executionContext, RuntimeMetadata metadata, GoogleSpreadsheetConnection connection)
UpdateExecution
createUpdateExecution(Command command, ExecutionContext executionContext, RuntimeMetadata metadata, GoogleSpreadsheetConnection connection)
MetadataProcessor<GoogleSpreadsheetConnection>
getMetadataProcessor()
Get a MetadataProcessor for the translator to read the metadata.List<String>
getSupportedFunctions()
Get list of all supported function names.void
start()
Initialize the connector with supplied configurationboolean
supportsAggregatesAvg()
Support indicates connector can accept the AVG aggregate functionboolean
supportsAggregatesCount()
Support indicates connector can accept the COUNT aggregate functionboolean
supportsAggregatesMax()
Support indicates connector can accept the MAX aggregate functionboolean
supportsAggregatesMin()
Support indicates connector can accept the MIN aggregate functionboolean
supportsAggregatesSum()
Support indicates connector can accept the SUM aggregate functionboolean
supportsCompareCriteriaEquals()
Support indicates connector accepts criteria of form (element = constant)boolean
supportsCompareCriteriaOrdered()
Support indicates connector accepts criteria of form (element <=|>= constant)
The query engine will may pushdown queries containing < or > if NOT is also supported.boolean
supportsGroupBy()
Whether the source supports an explicit GROUP BY clauseboolean
supportsHaving()
Whether the source supports the HAVING clauseboolean
supportsInCriteria()
Support indicates connector accepts criteria of form (element IN set)boolean
supportsLikeCriteria()
Support indicates connector accepts criteria of form (element LIKE constant)boolean
supportsNotCriteria()
Support indicates connector accepts logical criteria NOTboolean
supportsOrCriteria()
Support indicates connector accepts logical criteria connected by ORboolean
supportsOrderBy()
Support indicates connector accepts ORDER BY clause, including multiple elements and ascending and descending sorts.boolean
supportsRowLimit()
Gets whether the connector can limit the number of rows returned by a query.boolean
supportsRowOffset()
Gets whether the connector supports a SQL clause (similar to the LIMIT with an offset) that can return result sets that start in the middle of the resulting rows returned by a query-
Methods inherited from class org.teiid.translator.ExecutionFactory
addPushDownFunction, areLobsUsableAfterClose, closeConnection, createExecution, getCacheDirective, getCollationLocale, getConnection, getConnection, getDefaultNullOrder, getDirectQueryProcedureName, getExcludedCommonTableExpressionName, getInstance, getLanguageFactory, getMaxDependentInPredicates, getMaxFromGroups, getMaxInCriteriaSize, getMaxProjectedColumns, getMetadata, getNativeQueryProcedureName, getPushDownFunctions, getRequiredLikeEscape, getSupportedJoinCriteria, getTransactionSupport, getTypeFacility, initCapabilities, isCopyLobs, isForkable, isImmutable, isSourceRequired, isSourceRequiredForCapabilities, isSourceRequiredForMetadata, isThreadBound, requiresCriteria, returnsSingleUpdateCount, setCollationLocale, setCopyLobs, setDirectQueryProcedureName, setExcludedCommonTableExpressionName, setImmutable, setMaxDependentInPredicates, setMaxInCriteriaSize, setNativeQueryProcedureName, setRequiresCriteria, setSourceRequired, setSourceRequiredForMetadata, setSupportedJoinCriteria, setSupportsDirectQueryProcedure, setSupportsFullOuterJoins, setSupportsInnerJoins, setSupportsNativeQueries, setSupportsOrderBy, setSupportsOuterJoins, setSupportsSelectDistinct, setThreadBound, setTransactionSupport, supportsAdvancedOlapOperations, supportsAggregatesCountBig, supportsAggregatesCountStar, supportsAggregatesDistinct, supportsAggregatesEnhancedNumeric, supportsAliasedTable, supportsArrayAgg, supportsArrayType, supportsBatchedUpdates, supportsBulkUpdate, supportsCommonTableExpressions, supportsCompareCriteriaOrderedExclusive, supportsConvert, supportsCorrelatedSubqueries, supportsCorrelatedSubqueryLimit, supportsDependentJoins, supportsDirectQueryProcedure, supportsElementaryOlapOperations, supportsExcept, supportsExistsCriteria, supportsFormatLiteral, supportsFullDependentJoins, supportsFullOuterJoins, supportsFunctionsInGroupBy, supportsGeographyType, supportsGroupByMultipleDistinctAggregates, supportsGroupByRollup, supportsInCriteriaSubquery, supportsInlineViews, supportsInnerJoins, supportsInsertWithQueryExpression, supportsIntersect, supportsIsDistinctCriteria, supportsIsNullCriteria, supportsLateralJoin, supportsLateralJoinCondition, supportsLikeCriteriaEscapeCharacter, supportsLikeRegex, supportsListAgg, supportsMultipleOpenExecutions, supportsNativeQueries, supportsOnlyCorrelatedSubqueries, supportsOnlyFormatLiterals, supportsOnlyLateralJoinProcedure, supportsOnlyLiteralComparison, supportsOnlyRelationshipStyleJoins, supportsOnlySingleTableGroupBy, supportsOnlyTimestampAddLiteral, supportsOrderByNullOrdering, supportsOrderByUnrelated, supportsOrderByWithExtendedGrouping, supportsOuterJoins, supportsPartialFiltering, supportsProcedureParameterExpression, supportsProcedureTable, supportsQuantifiedCompareCriteriaAll, supportsQuantifiedCompareCriteriaSome, supportsRecursiveCommonTableExpressions, supportsScalarSubqueries, supportsScalarSubqueryProjection, supportsSearchedCaseExpressions, supportsSelectDistinct, supportsSelectExpression, supportsSelectExpressionArrayType, supportsSelectWithoutFrom, supportsSelfJoins, supportsSetQueryLimitOffset, supportsSetQueryOrderBy, supportsSimilarTo, supportsStringAgg, supportsSubqueryCommonTableExpressions, supportsSubqueryInOn, supportsUnions, supportsUpsert, supportsWindowDistinctAggregates, supportsWindowFrameClause, supportsWindowFunctionCumeDist, supportsWindowFunctionNthValue, supportsWindowFunctionNtile, supportsWindowFunctionPercentRank, supportsWindowOrderByWithAggregates, useAnsiJoin, useBindingsForDependentJoin
-
-
-
-
Field Detail
-
UTIL
public static final BundleUtil UTIL
-
-
Method Detail
-
start
public void start() throws TranslatorException
Description copied from class:ExecutionFactory
Initialize the connector with supplied configuration- Overrides:
start
in classExecutionFactory<ConnectionFactory,GoogleSpreadsheetConnection>
- Throws:
TranslatorException
-
createResultSetExecution
public ResultSetExecution createResultSetExecution(QueryExpression command, ExecutionContext executionContext, RuntimeMetadata metadata, GoogleSpreadsheetConnection connection) throws TranslatorException
- Overrides:
createResultSetExecution
in classExecutionFactory<ConnectionFactory,GoogleSpreadsheetConnection>
- Throws:
TranslatorException
-
createUpdateExecution
public UpdateExecution createUpdateExecution(Command command, ExecutionContext executionContext, RuntimeMetadata metadata, GoogleSpreadsheetConnection connection) throws TranslatorException
- Overrides:
createUpdateExecution
in classExecutionFactory<ConnectionFactory,GoogleSpreadsheetConnection>
- Throws:
TranslatorException
-
createDirectExecution
public ProcedureExecution createDirectExecution(List<Argument> arguments, Command command, ExecutionContext executionContext, RuntimeMetadata metadata, GoogleSpreadsheetConnection connection) throws TranslatorException
- Overrides:
createDirectExecution
in classExecutionFactory<ConnectionFactory,GoogleSpreadsheetConnection>
- Throws:
TranslatorException
-
createProcedureExecution
public ProcedureExecution createProcedureExecution(Call command, ExecutionContext executionContext, RuntimeMetadata metadata, GoogleSpreadsheetConnection connection) throws TranslatorException
- Overrides:
createProcedureExecution
in classExecutionFactory<ConnectionFactory,GoogleSpreadsheetConnection>
- Throws:
TranslatorException
-
getMetadataProcessor
public MetadataProcessor<GoogleSpreadsheetConnection> getMetadataProcessor()
Description copied from class:ExecutionFactory
Get a MetadataProcessor for the translator to read the metadata. Typically this will return a new instance.- Overrides:
getMetadataProcessor
in classExecutionFactory<ConnectionFactory,GoogleSpreadsheetConnection>
- Returns:
-
supportsCompareCriteriaEquals
public boolean supportsCompareCriteriaEquals()
Description copied from class:ExecutionFactory
Support indicates connector accepts criteria of form (element = constant)- Overrides:
supportsCompareCriteriaEquals
in classExecutionFactory<ConnectionFactory,GoogleSpreadsheetConnection>
-
supportsInCriteria
public boolean supportsInCriteria()
Description copied from class:ExecutionFactory
Support indicates connector accepts criteria of form (element IN set)- Overrides:
supportsInCriteria
in classExecutionFactory<ConnectionFactory,GoogleSpreadsheetConnection>
-
supportsLikeCriteria
public boolean supportsLikeCriteria()
Description copied from class:ExecutionFactory
Support indicates connector accepts criteria of form (element LIKE constant)- Overrides:
supportsLikeCriteria
in classExecutionFactory<ConnectionFactory,GoogleSpreadsheetConnection>
-
supportsOrCriteria
public boolean supportsOrCriteria()
Description copied from class:ExecutionFactory
Support indicates connector accepts logical criteria connected by OR- Overrides:
supportsOrCriteria
in classExecutionFactory<ConnectionFactory,GoogleSpreadsheetConnection>
-
supportsNotCriteria
public boolean supportsNotCriteria()
Description copied from class:ExecutionFactory
Support indicates connector accepts logical criteria NOT- Overrides:
supportsNotCriteria
in classExecutionFactory<ConnectionFactory,GoogleSpreadsheetConnection>
-
supportsAggregatesCount
public boolean supportsAggregatesCount()
Description copied from class:ExecutionFactory
Support indicates connector can accept the COUNT aggregate function- Overrides:
supportsAggregatesCount
in classExecutionFactory<ConnectionFactory,GoogleSpreadsheetConnection>
-
supportsAggregatesMax
public boolean supportsAggregatesMax()
Description copied from class:ExecutionFactory
Support indicates connector can accept the MAX aggregate function- Overrides:
supportsAggregatesMax
in classExecutionFactory<ConnectionFactory,GoogleSpreadsheetConnection>
-
supportsAggregatesMin
public boolean supportsAggregatesMin()
Description copied from class:ExecutionFactory
Support indicates connector can accept the MIN aggregate function- Overrides:
supportsAggregatesMin
in classExecutionFactory<ConnectionFactory,GoogleSpreadsheetConnection>
-
supportsAggregatesSum
public boolean supportsAggregatesSum()
Description copied from class:ExecutionFactory
Support indicates connector can accept the SUM aggregate function- Overrides:
supportsAggregatesSum
in classExecutionFactory<ConnectionFactory,GoogleSpreadsheetConnection>
-
supportsAggregatesAvg
public boolean supportsAggregatesAvg()
Description copied from class:ExecutionFactory
Support indicates connector can accept the AVG aggregate function- Overrides:
supportsAggregatesAvg
in classExecutionFactory<ConnectionFactory,GoogleSpreadsheetConnection>
-
supportsGroupBy
public boolean supportsGroupBy()
Description copied from class:ExecutionFactory
Whether the source supports an explicit GROUP BY clause- Overrides:
supportsGroupBy
in classExecutionFactory<ConnectionFactory,GoogleSpreadsheetConnection>
-
supportsOrderBy
public boolean supportsOrderBy()
Description copied from class:ExecutionFactory
Support indicates connector accepts ORDER BY clause, including multiple elements and ascending and descending sorts.- Overrides:
supportsOrderBy
in classExecutionFactory<ConnectionFactory,GoogleSpreadsheetConnection>
-
supportsHaving
public boolean supportsHaving()
Description copied from class:ExecutionFactory
Whether the source supports the HAVING clause- Overrides:
supportsHaving
in classExecutionFactory<ConnectionFactory,GoogleSpreadsheetConnection>
-
supportsCompareCriteriaOrdered
public boolean supportsCompareCriteriaOrdered()
Description copied from class:ExecutionFactory
Support indicates connector accepts criteria of form (element <=|>= constant)
The query engine will may pushdown queries containing < or > if NOT is also supported.- Overrides:
supportsCompareCriteriaOrdered
in classExecutionFactory<ConnectionFactory,GoogleSpreadsheetConnection>
-
supportsRowLimit
public boolean supportsRowLimit()
Description copied from class:ExecutionFactory
Gets whether the connector can limit the number of rows returned by a query.- Overrides:
supportsRowLimit
in classExecutionFactory<ConnectionFactory,GoogleSpreadsheetConnection>
-
supportsRowOffset
public boolean supportsRowOffset()
Description copied from class:ExecutionFactory
Gets whether the connector supports a SQL clause (similar to the LIMIT with an offset) that can return result sets that start in the middle of the resulting rows returned by a query- Overrides:
supportsRowOffset
in classExecutionFactory<ConnectionFactory,GoogleSpreadsheetConnection>
-
getSupportedFunctions
public List<String> getSupportedFunctions()
Description copied from class:ExecutionFactory
Get list of all supported function names. Arithmetic functions have names like "+".- Overrides:
getSupportedFunctions
in classExecutionFactory<ConnectionFactory,GoogleSpreadsheetConnection>
- See Also:
for a listing of system pushdown functions. Note that not all system functions are listed as some functions will use a common name such as CONCAT vs. the || operator, and other functions will be rewritten and not pushed down, such as SPACE. Note: User defined functions should be specified fully qualified.
-
-