After setting the CLASSPATH, the connection information needs to be passed in the form of a connection URL. This section provides examples of connection strings configured to use common features and functionality. You can modify and/or combine these examples to create a connection string for your environment.

Note:
  • You can also use the DataDirect Configuration Manager tool to generate and test connection URLs. For more information, see "Generating connection URLs with the Configuration Manager."
  • Connection property names are case-insensitive. For example, AuthenticationMethod is the same as authenticationmethod.
  • For connection properties that support string values, use the following escape sequence to specify values containing leading or trailing spaces and curly brackets: {value}. For example: ProxyPassword={hello } or ProxyPassword={{hello}}.
Important: Although you can still connect to Google Analytics, you cannot query your data without defining the tables in your schema using the AddTables property. You can generate a value for this property using the Configure Logical Schema button in the Configuration Manager and copy it into your string. See Generating connection URLs with the Configuration Manager for details.

OAuth 2 Authentication example

This string includes the properties used to connect with OAuth 2 authentication.

jdbc:datadirect:googleanalytics4:AddTables='{myTableDefinitionString}';
ClientID=ab123c45-def6-7g89-gh1i-m2345no67891.apps.googleusercontent.com;
ClientSecret=12a3=bCD/EfGh4Ijk+Lm5P67qR8s=//TuV+WXy1Zabcd;
RefreshToken=1//12a3=bCD/EfGh4Ijk+Lgd8g-44tk3c527831;[property=value[;...]];

For more information on these properties and values, see OAuth 2.0 Authentication.

Proxy Server

This string includes the properties used to connect to a Proxy Server using OAuth 2.0 authentication.

jdbc:datadirect:googleanalytics4:ProxyHost=pserver;ProxyPassword=secret;
ProxyPort=808;ProxyUser=proxy_user;AddTables='{myTableDefinitionString}';
ClientID=ab123c45-def6-7g89-gh1i-m2345no67891.apps.googleusercontent.com;
ClientSecret=12a3=bCD/EfGh4Ijk+Lm5P67qR8s=//TuV+WXy1Zabcd;
RefreshToken=1//12a3=bCD/EfGh4Ijk+Lgd8g-44tk3c527831;[property=value[;...]];

For more information on these properties and values, see Table 2.