JBoss Community Archive (Read Only)

Teiid 8.12

Google Spreadsheet Translator

The google-spreadsheet translator is used to connect to a Google Spreadsheet. To use the Google Spreadsheet Translator you need to configure and deploy the Google JCA connector - see the Admin Guide.

The query approach expects the data in the worksheet to be in a specific format. Namely:

If you are using a dynamic vdb, the metadata for your Google account (worksheets and information about columns in worksheets) are loaded upon translator start up. If you make any changes in data types, it is advisable to restart your vdb.

The translator supports queries against a single sheet. It supports ordering, aggregation, basic predicates, and most of the functions supported by the spreadsheet query language.

There are no google-spreadsheet importer settings, but it does provide metadata for dynamic VDBs.

JCA Resource Adapter

The Teiid specific Google Spreadsheet Data Sources Resource Adapter should be used with this translator.

Native Queries

Google spreadsheet source procedures may be created using the teiid_rel:native-query extension - see Parameterizable Native Queries. The procedure will invoke the native-query similar to an native procedure call with the benefits that the query is predetermined and that result column types are known, rather than requiring the use of ARRAYTABLE or similar functionality. See the Select format below.

Direct Query Procedure

This feature is turned off by default because of the security risk this exposes to execute any command against the source. To enable this feature, override the execution property called SupportsDirectQueryProcedure to true.

By default the name of the procedure that executes the queries directly is called native. Override the execution property DirectQueryProcedureName to change it to another name.

The Google spreadsheet translator provides a procedure to execute any ad-hoc query directly against the source without any Teiid parsing or resolving. Since the metadata of this procedure's execution results are not known to Teiid, they are returned as an object array. ARRAYTABLE can be used construct tabular output for consumption by client applications. Teiid exposes this procedure with a simple query structure as below:


Select Example
SELECT x.* FROM (call google_source.native('worksheet=People;query=SELECT A, B, C')) w,
 ARRAYTABLE(w.tuple COLUMNS "id" string , "type" string, "name" String) AS x

the first argument takes semi-colon(;) separated name value pairs of following properties to execute the procedure:





Google spreadsheet name



spreadsheet query



number rows to fetch



offset of rows to fetch from limit or beginning


JBoss.org Content Archive (Read Only), exported from JBoss Community Documentation Editor at 2020-03-13 12:26:58 UTC, last content change 2015-10-06 23:48:03 UTC.