Reference: WQL Query Usage and Guidelines for Data Export
Workday Query Language (WQL)
Workday Query Language (WQL) is a SQL-like language with some expressions and operators that you can use to optimize query performance when executing data export jobs. Workday validates query syntax to ensure it's valid for data export jobs.
WQL Expressions
To export data in bulk, you can use these SQL expressions in WQL to specify 1 or more fields (columns) from a table-backed Prism data source.
WQL doesn't support SELECT * .
WQL Clause | Option | Purpose | Usage Example |
|---|---|---|---|
SELECT | Selects 1 or more fields from a Prism data source. |
| |
AS | Creates a name alias for a field (column). |
| |
FROM | Specifies a Prism data source to export data from. |
| |
WHERE | Specifies a Prism data source to filter specific data from. |
To filter date fields, use this WQL clause: TO_DATE() . Example:
|
WQL Conditional Expressions
You can use these types of operators to create conditions in WQL expressions that limit or filter the data to extract from a Prism data source:
- Logical: Filters query results based on inclusion and exclusion criteria.
- Comparison: Compares a field to one or more values and filters the query results based on comparison criteria.
This table describes the purpose and usage examples of logical operators:
Operator | Purpose | Usage Example |
|---|---|---|
AND | Exports results that meet all conditions. |
|
OR | Exports results when either of the conditions are met. |
|
NOT | Exports results that meet the negated condition. |
|
This table describes the purpose and usage examples of comparison operators:
Operator | Purpose | Usage Example |
|---|---|---|
= (equal) | Exports 1 or more specified fields that equals the value. |
|
!= (not equal) | Exports 1 or more specified fields that don’t equal the value. |
|
> (greater than) | Exports 1 or more specified fields that are greater than the value. |
|
>= (greater than or equal to) | Exports 1 or more specified fields that are greater than or equal to the value. |
|
< (less than) | Exports 1 or more specified fields that are less than the value. |
|
<= (less than or equal to) | Exports 1 or more specified fields that are less than or equal to the value. |
|
IN | Exports 1 or more specified fields that equal 1 or more of the (comma separated) values. |
|
NOT IN | Exports 1 or more specified fields that don’t equal 1 or more of the (comma separated) values. |
|
IS NULL | Exports 1 or more specified fields that have no value. |
|
IS NOT NULL | Exports 1 or more specified fields that have |
|
WQL Functions
WQL supports 2 SQL functions that enable you to retrieve data-related information from instance fields:
- GET_DISPLAY_ID
- GET_REF_ID
When you use more than 1 function in the query, you must specify a unique alias name to each function using the AS option. Example: GET_DISPLAY_ID(cost_Center) AS cost_center.
Function Usage | Purpose | Usage Examples |
|---|---|---|
| Retrieves the data display name of the specified instance field. |
|
| Retrieves the reference id of the specified instance field. |
|