Skip to main content Skip to complementary content

Executing a profile

Availability-noteBeta

In this scenario, you use Talend APIs to execute a profile to improve your project quality.

About this task

Here are some details about the API call:

Method: POST
endpoint: api/v1/projects/quality/profiles/{id}/executions
payload:
    {
  "repository": "string",
  "authentication": {
    "username": "string",
    "passcode": "string"
  },
  "branch": "string",
  "workspace": "string",
  "client": "UI"
    }

The endpoint uses a profile ID as a parameter containing a list of specifications to execute on the Talend Project.

Procedure

  1. Call the GET api/v1/projects/quality/profiles endpoint to get the ID of the profile you want to execute.
  2. Note the ID of the profile you want to execute.
  3. Call the POST api/v1/projects/quality/profiles/{id}/executions endpoint to execute a profile. Add the ID of the profile you want to execute as a parameter.
  4. In the Body area, enter the following information:
    Parameter name Value
    repository Enter the name of the repository.
    username Enter your username.
    passcode Enter your passcode.
    branch Enter the branch name.
    workspace Enter the workspace name.
    client Enter the client name.

    Example:

     {
      "repository": "GIT",
      "authentication": {
        "username": "******",
        "passcode": "*************"
      },
      "branch": "master",
      "workspace": "PROJECT_73",
      "client": "UI"
    }
  5. Click Execute to issue your call.

Results

Here is an example of a response:
{
  "id": "67",
  "status": "FAILED",
  "startTimestamp": "2023-10-13 17:36",
  "duration": "2s",
  "specifications": [
    {
      "id": "69",
      "specification": {
        "id": "2",
        "name": "best-practice",
        "description": "This specification contains rules related to best practices",
        "operator": "is_Equal_to",
        "threshold": 100,
        "thresholdType": "PERCENTAGE",
        "createdBy": "system"
      },
      "status": "FAILED",
      "rules": [
        {
          "id": "77",
          "rule": {
            "id": "4",
            "name": "Active-tLogRow",
            "description": "Identify jobs with tLogRow components",
            "category": "COMPONENT",
            "severity": "MINOR",
            "operator": "is_less_than_or_Equal",
            "threshold": "5",
            "thresholdType": "PERCENTAGE",
            "createdBy": "system"
          },
          "result": "30",
          "status": "FAILED"
        },
        {
          "id": "78",
          "rule": {
            "id": "5",
            "name": "JavaLogs",
            "description": "Identify jobs that contain java logs.",
            "category": "COMPONENT",
            "severity": "INFO",
            "operator": "is_less_than_or_Equal",
            "threshold": "50",
            "thresholdType": "PERCENTAGE",
            "createdBy": "system"
          },
          "result": "4.56",
          "status": "PASSED"
        }
      ],
      "duration": "1s"
    }
  ],
  "sourceProvider": {
    "providerType": "LOCAL",
    "workspace": "D:\\Talend_Studio\\studio\\workspaces\\tcmp_test",
    "project": "PROJECT_73"
  },
  "info": {
    "version": "7.3.1",
    "label": "PROJECT_73",
    "description": "Project imported from TalendPS organization",
    "productVersion": "Talend Real-time Big Data Platform-7.3.1.20221115_1012-patch",
    "type": "DQ",
    "bigData": false,
    "local": false
  },
  "inventory": {
    "total_artifact_assets": 258,
    "context_group": 11,
    "standard_job": 210,
    "standard_job_versions": 211,
    "standard_joblet": 24,
    "standard_joblet_versions": 24,
    "resource": 2,
    "resource_versions": 24,
    "bd_batch": 1,
    "bd_batch_versions": 1,
    "bd_batch_joblet": 0,
    "bd_batch_joblet_versions": 0,
    "bd_streaming": 1,
    "bd_streaming_versions": 1,
    "bd_streaming_joblet": 0,
    "bd_streaming_joblet_versions": 0,
    "route": 46,
    "route_versions": 46,
    "routelet": 1,
    "routelet_versions": 1
  },
  "commits": [
    {
      "id": "24b228d45561e0a741a0409195ef492437bf3",
      "date": "Tue Feb 21 01:29:11 2023 +0000",
      "author": "talend <talend@3bed803c5b79>",
      "message": "\tCreate Project: PRJ_731\n"
    }
  ]
}
In this example, the Active-tLogRow rule looks for Jobs with the tLogRow components. As defined in the condition, the total number of assets identified should be less than the maximum threshold value, which is 5 here.

The result in this example is 30. The quality check of the rule failed. The status of the rule is Failed. The status of each rule is evaluated based on the comparison between the result and the threshold.

The overall quality of the project is determined by the status of the specification. The status of the specification is validated by the cumulative result or status of all the rules. In this example, the threshold is set to 100%. Here, even if a single condition or rule fails, the specification fails and the status is set to Failed.

The threshold, threshold type and operator can be updated based on the impact of the rules and specifications on the quality of your Talend project.

When all the specifications are executed, the status of the execution is set based on the following condition:
  • Passed: Status if all the specifications have passed.
  • Failed: Status if any specification failed.
  • Canceled: Status if the execution is canceled.
  • Running: Status if the execution is in progress.
The executions can be accessed using a GET /api/v1/projects/quality/profiles/executions endpoint. The executions can be filtered by several criteria: the status of the execution from a certain start time or the project name.
Executions can also be deleted by their execution IDs or by their status, start time or project name.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!