Questo contenuto non è disponibile nella lingua selezionata.
6.7. Google Spreadsheet Resource Adapter Properties
6.7.1. Google Spreadsheet Resource Adapter Properties Copia collegamentoCollegamento copiato negli appunti!
Copia collegamentoCollegamento copiato negli appunti!
The following table describes the configuration properties that can be configured for the Google Spreadsheet resource adapter:
|
Config property
|
Description
|
|---|---|
|
AuthMethod
|
This is the authentication method used to access Google. This property can be set to either
ClientLogin or OAuth2. If the setting is ClientLogin it is necessary to provide two additional properties: Username and Password. If the setting is OAuth2 it is necessary to provide a RefreshToken.
|
|
RefreshToken
|
This is required only if
AuthMethod=OAuth2
|
|
Username
|
Username for the Google account. Required only if
AuthMethod=ClientLogin
|
|
Password
|
Password for the Google account. Required only if
AuthMethod=ClientLogin
|
|
SpreadsheetName
|
The name of the spreadsheet to which this resource adapter is connecting. Required.
|
|
BatchSize
|
The maximum number of rows that can be fetched at a time. Default is 4096.
|
6.7.2. Obtaining an OAuth Refresh Token Copia collegamentoCollegamento copiato negli appunti!
Copia collegamentoCollegamento copiato negli appunti!
When using the Google Spreadsheet resource adapter with OAuth authentication, you will need to obtain an OAuth refresh token.
Procedure 6.1. Obtaining an OAuth Refresh Token
Get an authorization code
Click on the following link: Get Authorization CodeClick on to allow the Teiid Google Connector to access the Google account in which the spreadsheet resides.Obtain the refresh token
Copy the authorization code from the previous step into thecodefield of the following POST request and run it from the command line:curl \--data-urlencode code=AUTH_CODE \ --data-urlencode client_id=217138521084.apps.googleusercontent.com \ --data-urlencode client_secret=gXQ6-lOkEjE1lVcz7giB4Poy \ --data-urlencode redirect_uri=urn:ietf:wg:oauth:2.0:oob \ --data-urlencode grant_type=authorization_code https://accounts.google.com/o/oauth2/token
curl \--data-urlencode code=AUTH_CODE \ --data-urlencode client_id=217138521084.apps.googleusercontent.com \ --data-urlencode client_secret=gXQ6-lOkEjE1lVcz7giB4Poy \ --data-urlencode redirect_uri=urn:ietf:wg:oauth:2.0:oob \ --data-urlencode grant_type=authorization_code https://accounts.google.com/o/oauth2/tokenCopy to Clipboard Copied! Toggle word wrap Toggle overflow The refresh token will be in the response.