![]() |
VOOZH | about |
The CData Cmdlets Module for Workday is a standard PowerShell module offering straightforward integration with Workday. Below, you will find examples of using our Workday Cmdlets with native PowerShell cmdlets.
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.
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.
$conn = Connect-Workday -User "$User" -Password "$Password" -Tenant "$Tenant" -BaseURL "$BaseURL" -ConnectionType "$ConnectionType" -InitiateOAuth "$InitiateOAuth"
Follow the steps below to retrieve data from the Workers table and pipe the result into to a CSV file:
Select-Workday -Connection $conn -Table Workers | Select -Property * -ExcludeProperty Connection,Table,Columns | Export-Csv -Path c:\myWorkersData.csv -NoTypeInformation
You will notice that we piped the results from Select-Workday into a Select-Object cmdlet and excluded some properties before piping them into an Export-Csv cmdlet. We do this because the CData Cmdlets append Connection, Table, and Columns information onto each "row" in the result set, and we do not necessarily want that information in our CSV file.
The Connection, Table, and Columns are appended to the results in order to facilitate piping results from one of the CData Cmdlets directly into another one.The following line deletes any records that match the criteria:
Select-Workday -Connection $conn -Table Workers -Where "Legal_Name_Last_Name = Morgan" | Remove-Workday
The cmdlets make data transformation easy as well as data cleansing. The following example loads data from a CSV file into Workday, checking first whether a record already exists and needs to be updated instead of inserted.
Import-Csv -Path C:\MyWorkersUpdates.csv | %{
$record = Select-Workday -Connection $Workday -Table Workers -Where ("Id = `'"+$_.Id+"`'")
if($record){
Update-Workday -Connection $workday -Table Workers -Columns ("Worker_Reference_WID","Legal_Name_Last_Name") -Values ($_.Worker_Reference_WID, $_.Legal_Name_Last_Name) -Where ("Id = `'"+$_.Id+"`'")
}else{
Add-Workday -Connection $workday -Table Workers -Columns ("Worker_Reference_WID","Legal_Name_Last_Name") -Values ($_.Worker_Reference_WID, $_.Legal_Name_Last_Name)
}
}
As always, our goal is to simplify the way you connect to data. With cmdlets users can install a data module, set the connection properties, and start building. Download Cmdlets and start working with your data in PowerShell today!
Download a free trial of the Workday Cmdlets to get started:
Download NowLearn more:
👁 Workday IconAn easy-to-use set of PowerShell Cmdlets offering real-time access to Workday. The Cmdlets allow users to easily read, write, update, and delete live data - just like working with SQL server.