Establishing a Connection
Creating a JDBC Data Source
You can create a JDBC data source to connect from your Java application, based on CData JDBC Driver for Adobe Target.Follow these steps:
- Add the driver JAR file to the classpath. The JAR file is located in the installation directory's lib subfolder. Ensure that the .lic file is located in the same folder as the JAR file.
- Provide the driver class. For example:
cdata.jdbc.adobetarget.AdobeTargetDriver
- Provide the JDBC URL. For example:
jdbc:adobetarget:OAuthClientId=myOauthClientId;OauthClientSecret=myOAuthClientSecret;CallbackURL=myCallbackURL;
Or, if there is a conflict in your application between drivers using the same URL format, use this form to ensure that you are using the CData driver:
jdbc:cdata:adobetarget:OAuthClientId=myOauthClientId;OauthClientSecret=myOAuthClientSecret;CallbackURL=myCallbackURL;
Ensure that the URL starts with either jdbc:adobetarget: or jdbc:cdata:adobetarget:. The URL can include any of the connection properties in name-value pairs separated with semicolons.
Connecting to Adobe Target
To connect to Adobe Target, you must provide the Tenant property along with the required authentication parameters mentioned below. Note that while other connection properties can influence processing behavior, they do not affect the ability to connect.
To determine your Tenant name:
- Log in to Adobe Experience. The URL will look similar to: "https://experience.adobe.com/#/@mycompanyname/preferences/general-section".
- Extract the value after the "/#/@". In this example, it is "mycompanyname".
- Set the Tenant connection property to that value.
Authenticating to Adobe Target
Adobe Target uses the OAuth authentication standard. You can authenticate with the OAuth (Server-to-Server) integration.
User Accounts (OAuth)
You must set AuthScheme to OAuthClient for all user account flows.
Note: Adobe authentication via OAuth requires updating your token every two weeks.
All Applications
CData provides an embedded OAuth application that simplifies OAuth authentication. Alternatively, you can create a custom OAuth application. Review Creating a Custom OAuth App for more information.Obtaining the OAuth Access Token
Set the following properties to connect:
- InitiateOAuth: Set to GETANDREFRESH to automatically perform the OAuth exchange and refresh the OAuthAccessToken as needed.
- OAuthClientId : Set to the client Id assigned when you registered your app.
- OAuthClientSecret : Set to the client secret assigned when you registered your app.
- CallbackURL : Set to the redirect URI defined when you registered your app. For example: https://localhost:3333
With these settings, the provider obtains an access token from Adobe Target, which it uses to request data. The OAuth values are stored in the location specified by OAuthSettingsLocation, ensuring they persist across connections.