Metadata

Overview

To assist in creating custom logic and handling based on execution results, the platform provides a series of metadata related to job executions. These metadata can be used in webhooks to create specific sending conditions. The available metadata are:

Name
Type
Description

JOB_ID

uuid

Unique Job Identifier: Represents an endpoint for API connectors or a table for database connections. This unique identifier is used to distinguish and track specific jobs within the platform.

CONNECTION_ID

uuid

Unique Connection Identifier.

CONNECTION_NAME

string

Connection Name

SCHEMA_NAME

string

Name of the schema used for the pipeline tables in the destination Data Warehouse.

TABLE_NAME

string

Name of the table or endpoint in the destination Data Warehouse.

EXECUTION_ID

uuid

Identifier of the job execution that triggered the webhook.

STATUS

string

Final status of the execution (FINISHED, FAILED).

ROWS

integer

Number of rows found during the execution.

COLUMNS

integer

Number of selected columns.

TOTAL_DURATION

integer

Execution duration in seconds.

TRIGGERED_BY

string

Indicates the origin of the execution, divided into:

  • Erathos Schedule: regular schedules based on the selected frequency.

  • User's Email: manual executions via the platform.

  • API Key Owner's Email: programmatic triggers via the API.

IS_ORCHESTRATION

boolean

Indicator True for executions triggered programmatically or False for executions triggered by scheduling or manually via the platform.

FORCE_HISTORY

boolean

Indicator True for FULL type executions and False for PARTIAL type executions.

NESTED_TABLE

boolean

Indicator if the table is nested (always False for database connectors).

FINISHED_AT_DATE

date

Completion date of the execution in YYYY-MM-DD format.

FINISHED_AT_TIME

time

Time of completion of the execution in UTC time zone and in HH:MM format.

FINISHED_AT_WEEKDAY

integer

Day of the week corresponding to the completion of the execution (0 - Sunday, 1 - Monday, 2 - Tuesday, 3 - Wednesday, 4 - Thursday, 5 - Friday, 6 - Saturday).

Alternative usage

In addition to orchestrating external tasks, webhooks can also be used as a method for ingesting execution metadata, which can be sent to various destinations or even to a custom API.


{
  "description": "Send metadata to custom API",
  "is_active": true,
  "method": "POST",
  "url": "https://${{variables.api_url}}",
  "header": {
    "Authorization": "${{secrets.token}}" 
  },
  "body": {
    "job_id": "${{erathos.job_id}}",
    "connection_id": "${{erathos.connection_id}}",
    "connection_name": "${{erathos.connection_name}}",
    "schema_name": "${{erathos.schema_name}}",
    "table_name": "${{erathos.table_name}}",
    "execution_id": "${{erathos.execution_id}}",
    "status": "${{erathos.status}}",
    "rows": "${{erathos.rows}}",
    "columns": "${{erathos.columns}}",
    "total_duration": "${{erathos.total_duration}}",
    "triggered_by": "${{erathos.triggered_by}}",
    "is_orchestration": "${{erathos.is_orchestration}}",
    "force_history": "${{erathos.force_history}}",
    "nested_table": "${{erathos.nested_table}}",
    "finished_at_date": "${{erathos.finished_at_date}}",
    "finished_at_time": "${{erathos.finished_at_time}}",
    "finished_at_weekday": "${{erathos.finished_at_weekday}}"
  },
  "rules": [
  ],
  "jobs": [
    "<ERATHOS_JOB1_ID>",
    "<ERATHOS_JOB2_ID>",
    ...
    "<ERATHOS_JOBN_ID>"
  ]
}

Last updated