![]() |
VOOZH | about |
The CData JDBC driver for Workday is easy to integrate with Java Web applications. This article shows how to efficiently connect to Workday data in Jetty by configuring the driver for connection pooling. You will configure a JNDI resource for Workday in Jetty.
CData provides the easiest way to access and integrate live data from Workday. Customers use CData connectivity to:
Users frequently integrate Workday with analytics tools such as Tableau, Power BI, and Excel, and leverage our tools to replicate Workday data to databases or data warehouses. Access is secured at the user level, based on the authenticated user's identity and role.
For more information on configuring Workday to work with CData, refer to our Knowledge Base articles: Comprehensive Workday Connectivity through Workday WQL and Reports-as-a-Service & Workday + CData: Connection & Integration Best Practices.
Follow the steps below to connect to Salesforce from Jetty.
Enable the JNDI module for your Jetty base. The following command enables JNDI from the command-line:
java -jar ../start.jar --add-to-startd=jndi
Declare the resource and its scope. Enter the required connection properties in the resource declaration. This example declares the Workday data source at the level of the Web app, in WEB-INF\jetty-env.xml.
<Configure id='workdaydemo' class="org.eclipse.jetty.webapp.WebAppContext"> <New id="workdaydemo" class="org.eclipse.jetty.plus.jndi.Resource"> <Arg><Ref refid="workdaydemo"/></Arg> <Arg>jdbc/workdaydb</Arg> <Arg> <New class="cdata.jdbc.workday.WorkdayDriver"> <Set name="url">jdbc:workday:</Set> <Set name="User">myuser</Set> <Set name="Password">mypassword</Set> <Set name="Tenant">mycompany_gm1</Set> <Set name="BaseURL">https://wd3-impl-services1.workday.com</Set> <Set name="ConnectionType">WQL</Set> <Set name="InitiateOAuth">GETANDREFRESH</Set> </New> </Arg> </New> </Configure>
To connect to Workday, users need to find the Tenant and BaseURL and then select their API type.
To obtain the BaseURL and Tenant properties, log into Workday and search for "View API Clients." On this screen, you'll find the Workday REST API Endpoint, a URL that includes both the BaseURL and Tenant.
The format of the REST API Endpoint is: https://domain.com/subdirectories/mycompany, where:
The value you use for the ConnectionType property determines which Workday API you use. See our Community Article for more information on Workday connectivity options and best practices.
| API | ConnectionType Value |
|---|---|
| WQL | WQL |
| Reports as a Service | Reports |
| REST | REST |
| SOAP | SOAP |
Your method of authentication depends on which API you are using.
See the Help documentation for more information on configuring OAuth with Workday.
Configure the resource in the Web.xml:
jdbc/workdaydb javax.sql.DataSource Container
You can then access Workday with a lookup to java:comp/env/jdbc/workdaydb:
InitialContext ctx = new InitialContext();
DataSource myworkday = (DataSource)ctx.lookup("java:comp/env/jdbc/workdaydb");
The steps above show how to configure the driver in a simple connection pooling scenario. For more use cases and information, see the Working with Jetty JNDI chapter in the Jetty documentation.
Download a free trial of the Workday Driver to get started:
Download NowLearn more:
👁 Workday IconRapidly create and deploy powerful Java applications that integrate with Workday.