Connect to Sage X3 Cloud Data in Aqua Data Studio

Jerod Johnson
Jerod Johnson
Director, Technology Evangelism
Access Sage X3 Cloud data from tools in Aqua Data Studio such as the Visual Query Builder and the Table Data Editor.

The CData JDBC Driver for Sage X3 Cloud integrates Sage X3 Cloud data with wizards and analytics in IDEs like Aqua Data Studio. This article shows how to connect to Sage X3 Cloud data through the connection manager and execute queries.

Create a JDBC Data Source

You can use the connection manager to define connection properties and save them in a new JDBC data source. The Sage X3 Cloud data source can then be accessed from Aqua Data Studio tools.

  1. In Aqua Data Studio, select Register Server from the Servers menu.
  2. In the Register Server form, select the 'Generic - JDBC' connection.
  3. Enter the following JDBC connection properties:
    • Name: Enter a name for the data source; for example, Sage X3 Cloud.
    • Driver Location: Click the Browse button and select the cdata.jdbc.sagex3cloud.jar file, located in the lib subfolder of the installation directory.
    • Driver: Enter the Driver's class name, cdata.jdbc.sagex3cloud.SageX3CloudDriver.
    • URL: Enter the JDBC URL, which starts with jdbc:sagex3cloud: and is followed by a semicolon-separated list of connection properties.

      Sage X3 Cloud uses the OAuth 2.0 Client Credentials flow, and an X-API-Key is also required for API access. Set AuthScheme to OAuth and specify the following connection properties:

      • URL: The base URL of your Sage X3 Cloud instance.
      • OAuthAccessTokenUrl: The OAuth token endpoint (e.g., https://your-auth-domain/oauth/token).
      • OAuthClientId: Your OAuth application client ID.
      • OAuthClientSecret: Your OAuth application client secret.
      • Audience: The API audience value for the token request.
      • XAPIKey: The X-API-Key provided by your Sage X3 Cloud administrator.
      • Folder: The Sage X3 folder name (e.g., SEED). This folder is used as the default schema.
      • Folders (optional): A comma-separated list of Sage X3 folders (e.g., SEED,PERF). Each folder is exposed as a separate schema, so you can query across folders with the Schema.Table syntax.

      The driver obtains an access token with the Client Credentials flow and sends it with the X-API-Key on every API request. With InitiateOAuth set to GETANDREFRESH (the default), the driver acquires and refreshes the token automatically.

      Built-in Connection String Designer

      For assistance in constructing the JDBC URL, use the connection string designer built into the Sage X3 Cloud JDBC Driver. Either double-click the JAR file or execute the jar file from the command-line.

      
      java -jar cdata.jdbc.sagex3cloud.jar
      

      Fill in the connection properties and copy the connection string to the clipboard.

      Using the built-in connection string designer to generate a JDBC URL (Salesforce is shown.) A typical JDBC URL is below:
      jdbc:sagex3cloud:AuthScheme=OAuth;URL=https://x3server/;OAuthAccessTokenUrl=https://auth-domain/oauth/token;OAuthClientId=your_client_id;OAuthClientSecret=your_client_secret;Audience=https://api-audience;XAPIKey=your_api_key;Folder=SEED;
    The JDBC data source, defined by the JAR path, driver class, and JDBC URL. (QuickBooks is shown.)

Query Sage X3 Cloud Data

You can now query the tables exposed.

A query executed in the Table Data Editor. (QuickBooks is shown.)

Ready to get started?

Download a free trial of the Sage X3 Cloud Driver to get started:

 Download Now

Learn more:

Sage X3 Cloud Icon Sage X3 Cloud JDBC Driver

Rapidly create and deploy powerful Java applications that integrate with Sage X3 Cloud.