📊 Export job executions report to Excel
In a nutshell
This job allows you to export a report of all job executions from the last N days into an Excel file.
You can customize the number of days when executing the job (default: 30 days).
📥 Download the latest version of this job.
⌛ Time to setup: 5 minutes.
📋 Prerequisites: A Product-Live account with access to the Data Factory platform.
The current version is (last updated on 2026-02-10).
Generic job reference: .
Result
Once set up, a job is available in the Data Factory jobs list.
When executing the job, you can specify the number of days to include in the report (default: 30 days).
The job will generate an Excel report containing all job executions from the specified period, with details such as job name, status, start/end times, and duration.
Requirement
To deploy this job, you'll need a valid Product-Live account and an active Data Factory pipeline.
If you don't have access to the Data Factory module, please contact our support team.
Setup
- Download the last version of this job, available here
- Then simply import the downloaded Data Factory job in your account.
Further information
Job design
The job is composed of 4 tasks, organized as presented in the following diagram:
mermaid
flowchart TD
start["🏁 Job Start"]
end_["🟢 Job is complete"]
calculate["Calculate date [1]"]
fetch["Fetch job executions [2]"]
transform["Transform to XML [3]"]
excel["Generate Excel report [4]"]
start --> calculate
calculate --> fetch
fetch --> transform
transform --> excel
excel --> end_- [1]: The Data Factory task used is
code-execute-javascript - [2]: The Data Factory task used is
data-job-execution-find - [3]: The Data Factory task used is
code-execute-javascript - [4]: The Data Factory task used is
file-generation-xlsx
If it's your first time using Data Factory, the Get started tutorial is a good place to start. You can also check the Tasks section to learn more about the different tasks available.
Detailed parameters
Job Input Parameter
The job accepts an optional input parameter:
| Parameter | Type | Default | Description |
|---|---|---|---|
days | NUMBER | 30 | Number of days to look back for job executions |
Example execution with custom parameter:
json
{
"days": 7
}1
2
3
2
3
This will fetch job executions from the last 7 days instead of the default 30 days.
[1] Calculate start date
This task calculates the start date based on the days parameter:
json
{
"expressionFile": "file://assets/calculate-date.js",
"data": {
"days": "${workflow.input.days}"
}
}1
2
3
4
5
6
2
3
4
5
6
The JavaScript file:
- Reads the
daysparameter (defaults to 30 if not provided) - Calculates the timestamp N days ago
- Returns:
startDateISO: ISO 8601 formatted date stringdaysRequested: Number of days used in calculation
[2] Fetch job executions
This task retrieves all job executions from the calculated date:
json
{
"limit": 1000,
"where": [
{
"type": "greater",
"field": "createdAt",
"value": "${calculate_start_date.output.result.startDateISO}"
}
],
"orderBy": [
{
"field": "createdAt",
"order": "desc"
}
]
}1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
[3] Transform to XML
This task uses JavaScript (loaded from an external file) to transform the JSON data into XML format suitable for Excel generation:
json
{
"expressionFile": "file://assets/transform-to-xml.js",
"data": {
"items": "${data_job_execution_find.output.result.items}"
}
}1
2
3
4
5
6
2
3
4
5
6
The JavaScript file (assets/transform-to-xml.js) performs the following operations:
- Extracts execution data from the API response
- Calculates execution duration (endedAt - startedAt)
- Formats dates to readable format (YYYY-MM-DD HH:MM:SS)
- Escapes XML special characters
- Generates XML structure in the
file-generation-xlsxformat:- Uses
<Generate-Excel>root element - Creates
<Cell-Text>and<Cell-Number>elements for each cell - Positions cells by line and column numbers
- First line contains headers, subsequent lines contain data
- Uses
[4] Generate Excel report
This task generates the final Excel file from the XML data:
json
{
"request": "${code_execute_javascript.output.result.xml}",
"templates": [
{
"key": "report",
"file": "file://assets/template.xlsx"
}
]
}1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
Template structure
The JavaScript transformation handles all the data insertion, so you only need to provide:
- A blank Excel file, OR
- An Excel file with pre-formatted cells (colors, borders, fonts, etc.)