August 30, 2026

Building an Employee Attrition Prediction Model with Azure ML Studio and Oracle HCM

 Category: Azure ML / HCM Integration

Predicting employee attrition before it happens is one of the most valuable things an HR analytics team can do. In this post I walk through how I built a full pipeline: Oracle HCM data → Azure ML AutoML → Managed Online Endpoint → OTBI/VBCS for display.

Step 1 — Export the Dataset from Oracle HCM

Use an OTBI analysis or HCM Extract to pull the training dataset. Key columns to include:

  • Employee tenure (months)
  • Department, Job Function, Grade
  • Absence frequency (last 12 months)
  • Performance rating (last 2 cycles)
  • Last promotion date
  • Voluntary termination flag (target variable: 1 = left, 0 = stayed)

Export as CSV and upload to Azure Blob Storage.

Step 2 — Run AutoML Classification in Azure ML Studio

# Azure ML AutoML setup (Python SDK)
from azure.ai.ml import MLClient
from azure.ai.ml.automl import classification

automl_job = classification(
    compute="cpu-cluster",
    training_data=training_data,
    target_column_name="attrition_flag",
    primary_metric="AUC_weighted",
    n_cross_validations=5,
    enable_model_explainability=True
)

returned_job = ml_client.jobs.create_or_update(automl_job)
✦ Use AUC_weighted as the primary metric for attrition prediction — the dataset is almost always imbalanced (far more retained employees than terminations). Accuracy alone will mislead you.

Step 3 — Deploy to Managed Online Endpoint

Once the best model is selected by AutoML, deploy it as a REST endpoint. This gives Oracle VBCS a URL to call for real-time predictions.

az ml online-endpoint create --name attrition-endpoint
az ml online-deployment create \
  --endpoint-name attrition-endpoint \
  --name blue \
  --model azureml:attrition-model:1

Step 4 — Connect to Oracle VBCS

In VBCS, create a new Service Connection pointing to the Azure ML endpoint URL. Pass employee attributes as the request payload. Display the attrition risk score in a custom HCM dashboard tile.

Step 5 — Surface Results in OTBI

Write the prediction scores back into a custom Oracle HCM attribute (using HCM Extracts in reverse or a REST API write-back). Create an OTBI analysis that shows high-risk employees by department, enabling HR to act proactively.

Azure ML StudioOracle Fusion HCMOTBIVBCSAttrition PredictionAutoML

Deploying an Absence Analyst Agent in Oracle AI Agent Studio — What Nobody Tells You

 

Deploying an Absence Analyst Agent in Oracle AI Agent Studio — What Nobody Tells You


Oracle AI Agent Studio lets you build intelligent agents that run inside Oracle Fusion — no external tools required. I recently deployed a Workforce Operations Absence Analyst agent, and I want to share the exact issues I hit and how I resolved them.

What the Agent Does

The Absence Analyst agent monitors absence trends across teams, flags unusual patterns, and surfaces insights without a human having to run reports manually. It connects to HCM Absence records and uses configured business rules to classify and summarise absences.

The JSON Node Error — What It Looks Like

The most common failure during deployment is a JSON node misconfiguration. The agent workflow file (.wf) stores node definitions in JSON format. A missing comma, an extra bracket, or a misquoted key will silently break the entire flow.

{
  "nodeType": "ABSENCE_QUERY",
  "parameters": {
    "dateRange": "CURRENT_MONTH"   ← missing comma after this line
    "employeeScope": "ALL_ACTIVE"
  }
}
✦ Always validate your .wf JSON against a linter before saving. Even one syntax error causes the entire agent to fail at runtime with a generic "Node execution failed" message — no line number given.

Debugging the .wf File

  1. Download the .wf file from the Agent Studio export
  2. Open in VS Code and run JSON validation (Ctrl+Shift+P → Format Document)
  3. Look for red squiggles — fix all JSON syntax errors
  4. Re-import the corrected file into AI Agent Studio
  5. Test in Sandbox environment before promoting to Production

Deployment Checklist

StepActionCommon Mistake
1Configure data source connectionWrong HCM environment URL
2Define agent role and permissionsMissing Absence Viewer role
3Upload .wf workflow fileJSON syntax errors
4Set trigger scheduleTimezone mismatch (use UTC)
5Test in SandboxSkipping this step

Once the agent is live, it saves HR teams hours each week. The output is surfaced directly in the HCM dashboard — no separate tool, no export, no manual refresh.

Oracle AI Agent StudioOracle Fusion HCMAbsence ManagementWorkforce Analytics

October 8, 2018

COALESCE-SQL

Coalesce- return the null values from the expression. It works similar to a case statement where if expression 1 is false then goes to expression 2 or returns a default set value.

In same way Coalesce will take the null values and replace with the given default value or act according to expression defined for null.

e.g:-

SELECT product_id, list_price, min_price,
   COALESCE(0.9*list_price, min_price, 5) "Sale"
   FROM product_information
   WHERE supplier_id = 102050
   ORDER BY product_id, list_price, min_price, "Sale";

PRODUCT_ID LIST_PRICE  MIN_PRICE       Sale
---------- ---------- ---------- ----------
      1769         48                  43.2
      1770                    73         73
      2378        305        247      274.5
      2382        850        731        765
      3355                                5

August 4, 2018

NULLS LAST/FIRST

When we use RANK function and if we have the ranking criteria column with NULL values, they do have chances to be listed in first position. By using Nulls last we can avoid such occurrences.

Ex:

Student ranking first based on their achieved grades on all test they appeared.

select p.name Student, m.name, m.tests, rank() over ( order by tests desc ) as S_rank from ptudents p, test m where p.name = m.student_name(+) and p.name in ('M','V','P','M','N') order by s_rank


StudentNAMEtestsS_RANK
V- - 1
M- - 1
NT11353.43
PC1603.64
NP12105
NN11706


select p.name Student, m.name, m.tests, rank() over ( order by tests desc NULLS LAST ) as S_rank
from ptudents p, test m where p.name = m.student_name(+) and p.name in ('M','V','P','M','N') order by s_rank


StudentNAMEtestsS_RANK

NT11353.41
PC1603.62
NP12103
NN11704
Ans null will be listed in last

More on Ranking Functions


More on Ranking:

We have seen RANK(),DENSE_RANK(),ROW_NUMBER in our previous post, lets see about CUME_DIST,PERCENT_RANK() and NTILE

PERCENT_RANK:- Given with the details of sales made in a year for n number of items and list as per sales percentage.
(rank of row-1)/(total number of rows -1)=Percent_rank
select name, gross_sales,
       100*percent_rank() over ( order by gross_sales ) as pctrank
from movies
order by 2,name

Name   Gross Sales         PCTRank
Abc        35                           1
Efg          33                           2.344
Igh          30                           3.344

CUME_DIST: For cumulative ranking often used for graphical purpose.
select name, gross_sales,
100*percent_rank() over ( order by gross_sales ) as pctrank
       100*cume_dist() over ( order by gross_sales ) as cumedist
from movies
order by 2,name
Name   Gross Sales         PCTRank        Cumedist
Abc        35                           1                              1
Efg          33                           2.344                  2
Igh          30                           2.346                  2
Yhi          29                           2.12                        3

NTILE(n):-Segregate the data as per the set of records given to n-tile value

select name, gross_sales,
       ntile(3) over ( order by gross_sales desc ) as quartile
from movies
order by 2,nam Name   Gross Sales         PCTRank        Cumedist
Abc        35                           1                              1                              1
Efg          33                           2.344                  2                              1

Igh          30                           2.346                  2                              2
Yhi          29                           2.12                        3                              2

Abc1      29                           1                              1                              3
Efg2       28                           2.344                  2                                3









July 31, 2018

Find leave taken in alternate intervals within a month

We saw the Rank Function in my previous post for sorting records. In the same way using the function we can get the count of leaves taken in alternate intervals with a month for an employee.

For example:
Leaves taken on 1,2,3,4 of a month and came to office on 5th and again went on leave from 6th. the summary of absence using the query can be obtained.

select min(date_taken) date_from,
       max(date_taken) date_to,
       count(*) num_days
from (
  select date_taken,
         date_taken-row_number() over(order by date_taken) as daysto
         from Absence
     )
group by daysto
order by 1
DATE_FROMDATE_TONUM_SAMPLES
01-DEC-1504-DEC-154
07-DEC-1510-DEC-154
14-DEC-1516-DEC-153
19-DEC-1520-DEC-152


July 29, 2018

RANK Function

RANK Function:

Each entry can be ranked based on any of the given criteria. For e.g:- grading system in a school.

Syntax:
Function
(arg1,arg2)
OVER(
Partition Clause-Sort as per a particular criteria(eg.job,grade)
Sorting Clause-Normal sort of full record
Windowing Clause- sort based on any one record value.
)


Function -Rank, Dense Rank, Row number

Rank:

1 2 3 3 - Two person are in tie while ranking both will be given same ranking by the next rank will be  added value of one more position i.e

1 2 3 3 5- the 3rd position has a tie and occupies 2 position with same ranking, so the next person will be pushed to 5th in order ranking.

E.g:

Select empno,empname,job,sal,
rank() OVER (order by sal) as rank_sal from emp order by sal.

Dense Ranking:

1 2 3 3 4 -  the 3rd position has a tie and occupies 2 position with same ranking, but the next person will be ranked to next sequence 4th.


Select empno,empname,job,sal,
dense_rank() OVER (order by sal) as rank_sal from emp order by sal.



Row number

1 2 3 4 5 6  -Tie records will be ordered as per the column we add to order and the tie will replaced to sequential

Based on what field we need to position the tie records we can mention in sorting clause.

E.g:

Select empno,empname,job,sal,
row_number() OVER (order by sal,empno) as rank_sal from emp order by sal.

here empno column next to order by clause indicates that the tie should be ranked with precedance of employee number.


Building an Employee Attrition Prediction Model with Azure ML Studio and Oracle HCM

  Category: Azure ML / HCM Integration Tags: Azure ML, OTBI, VBCS, Attrition Predicting employee attrition before it happens is one of the m...