Discover how a bimodal integration strategy can address the major data management challenges facing your organization today.
Get the Report →Query SAP Ariba Source Data in DataGrip
Create a Data Source for SAP Ariba Source in DataGrip and use SQL to query live SAP Ariba Source data.
DataGrip is a database IDE that allows SQL developers to query, create, and manage databases. When paired with the CData JDBC Driver for SAP Ariba Source, DataGrip can work with live SAP Ariba Source data. This article shows how to establish a connection to SAP Ariba Source data in DataGrip and use the table editor to load SAP Ariba Source data.
Create a New Driver Definition for SAP Ariba Source
The steps below describe how to create a new Data Source in DataGrip for SAP Ariba Source.
- In DataGrip, click File -> New > Project and name the project
- In the Database Explorer, click the plus icon () and select Driver.
- In the Driver tab:
- Set Name to a user-friendly name (e.g. "CData SAP Ariba Source Driver")
- Set Driver Files to the appropriate JAR file. To add the file, click the plus (), select "Add Files," navigate to the "lib" folder in the driver's installation directory and select the JAR file (e.g. cdata.jdbc.saparibasource.jar).
- Set Class to cdata.jdbc.saparibasource.SAPAribaSource.jar
Additionally, in the advanced tab you can change driver properties and some other settings like VM Options, VM environment, VM home path, DBMS, etc - For most cases, change the DBMS type to "Unknown" in Expert options to avoid native SQL Server queries (Transact-SQL), which might result in an invalid function error
- Click "Apply" then "OK" to save the Connection
Configure a Connection to SAP Ariba Source
- Once the connection is saved, click the plus (), then "Data Source" then "CData SAP Ariba Source Driver" to create a new SAP Ariba Source Data Source.
- In the new window, configure the connection to SAP Ariba Source with a JDBC URL.
Built-in Connection String Designer
For assistance in constructing the JDBC URL, use the connection string designer built into the SAP Ariba Source JDBC Driver. Either double-click the JAR file or execute the jar file from the command-line.
java -jar cdata.jdbc.saparibasource.jar
Fill in the connection properties and copy the connection string to the clipboard.
In order to connect with SAP Ariba Source, set the following:
- API: Specify which API you would like the provider to retrieve SAP Ariba data from. Select the Supplier, Sourcing Project Management, or Contract API based on your business role (possible values are SupplierDataAPIWithPaginationV4, SourcingProjectManagementAPIV2, or ContractAPIV1).
- DataCenter: The data center where your account's data is hosted.
- Realm: The name of the site you want to access.
- Environment: Indicate whether you are connecting to a test or production environment (possible values are TEST or PRODUCTION).
If you are connecting to the Supplier Data API or the Contract API, additionally set the following:
- User: Id of the user on whose behalf API calls are invoked.
- PasswordAdapter: The password associated with the authenticating User.
If you're connecting to the Supplier API, set ProjectId to the Id of the sourcing project you want to retrieve data from.
Authenticating with OAuth
After setting connection properties, you need to configure OAuth connectivity to authenticate.
- Set AuthScheme to OAuthClient.
- Register an application with the service to obtain the APIKey, OAuthClientId and OAuthClientSecret.
For more information on creating an OAuth application, refer to the Help documentation.
Automatic OAuth
After setting the following, you are ready to connect:
-
APIKey: The Application key in your app settings.
OAuthClientId: The OAuth Client Id in your app settings.
OAuthClientSecret: The OAuth Secret in your app settings.
When you connect, the provider automatically completes the OAuth process:
- The provider obtains an access token from SAP Ariba and uses it to request data.
- The provider refreshes the access token automatically when it expires.
- The OAuth values are saved in memory relative to the location specified in OAuthSettingsLocation.
- Set URL to the connection string, e.g.,
jdbc:saparibasource:API=SupplierDataAPIWithPagination-V4;APIKey=wWVLn7WTAXrIRMAzZ6VnuEj7Ekot5jnU;Environment=SANDBOX;Realm=testRealm;AuthScheme=OAuthClient;InitiateOAuth=GETANDREFRESH
- Click "Apply" and "OK" to save the connection string
At this point, you will see the data source in the Data Explorer.
Execute SQL Queries Against SAP Ariba Source
To browse through the SAP Ariba Source entities (available as tables) accessible through the JDBC Driver, expand the Data Source.
To execute queries, right click on any table and select "New" -> "Query Console."
In the Console, write the SQL query you wish to execute. For example: SELECT SMVendorID, Category FROM Vendors WHERE Region = 'USA'
Download a free, 30-day trial of the CData JDBC Driver for SAP Ariba Source and start working with your live SAP Ariba Source data in DataGrip. Reach out to our Support Team if you have any questions.