![]() |
VOOZH | about |
Apache Spark is a fast and general engine for large-scale data processing. When paired with the CData JDBC Driver for Workday, Spark can work with live Workday data. This article describes how to connect to and query Workday data from a Spark shell.
The CData JDBC Driver offers unmatched performance for interacting with live Workday data due to optimized data processing built into the driver. When you issue complex SQL queries to Workday, the driver pushes supported SQL operations, like filters and aggregations, directly to Workday and utilizes the embedded SQL engine to process unsupported operations (often SQL functions and JOIN operations) client-side. With built-in dynamic metadata querying, you can work with and analyze Workday data using native data types.
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.
Download the CData JDBC Driver for Workday installer, unzip the package, and run the JAR file to install the driver.
$ spark-shell --jars /CData/CData JDBC Driver for Workday/lib/cdata.jdbc.workday.jar
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.
For assistance in constructing the JDBC URL, use the connection string designer built into the Workday JDBC Driver. Either double-click the JAR file or execute the jar file from the command-line.
java -jar cdata.jdbc.workday.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.)Configure the connection to Workday, using the connection string generated above.
scala> val workday_df = spark.sqlContext.read.format("jdbc").option("url", "jdbc:workday:User=myuser;Password=mypassword;Tenant=mycompany_gm1;BaseURL=https://wd3-impl-services1.workday.com;ConnectionType=WQL;InitiateOAuth=GETANDREFRESH;").option("dbtable","Workers").option("driver","cdata.jdbc.workday.WorkdayDriver").load()
Register the Workday data as a temporary table:
scala> workday_df.registerTable("workers")
Perform custom SQL queries against the Data using commands like the one below:
scala> workday_df.sqlContext.sql("SELECT Worker_Reference_WID, Legal_Name_Last_Name FROM Workers WHERE Legal_Name_Last_Name = Morgan").collect.foreach(println)
You will see the results displayed in the console, similar to the following:
👁 Data in Apache Spark (Salesforce is shown)Using the CData JDBC Driver for Workday in Apache Spark, you are able to perform fast and complex analytics on Workday data, combining the power and utility of Spark with your data. Download a free, 30 day trial of any of the hundreds of CData JDBC Drivers and get started today.
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.