Skip to main content

ETL and workflows

One workflow has usually its own ETL, because a workflow has its own set of data, account, traces, etc. An ETL is linked to a workflow through the workflow_id. For example, on a workflow “Renewal”, we have an ETL called agre-renewal, which has its own data with filters, its own database name in metabase, and so on.

ETL is a Job

Below is a representation of an ETL
An ETL is a Job as represented in Launcher-API. This JOB has a type ETL and data typed EtlJobData
An ETL launches on a Kubernetes cluster as a job. When a job is launched, a pod is created. Pods are instances of job (contains Job data) and lives also in Launcher database.

DTO

literal
Name of the etl
literal
The frequency of the etl job. Must match cron expression literal. See (see cron expression )
literal
Description of the etl
Date
Starting date of the ETL, if scheduled, it will start at this time.
Date
Ending date of the ETL, if scheduled, it will end at this time.
literal
Docker image name used for this ETL. One ETL can have its own docker image (for example, financial flow has its own set of calculation and has its own docker image)
string
Sentry monitor slug name, available in Sentry when you create a cron monitor. Slug enables Sentry to identify the monitor within your app. Whenever a job is running with this slug, Sentry can link it to the monitor and display its results (status, triggering date, etc).
string
Sentry DSN (Data Source Name), available in Sentry when you create a sentry project DSN. A DSN tells a Sentry where to send events so the events are associated with the correct project.
object
Metadata is an object that takes a property store_execution_logs, which is a boolean. By default, this property is set to false, which means Launcher-API won’t store the logs of the pods. This has been decided for storage purpose, as a log can take lot of memory. To enable logs written in database, you would need to put the store_execution_logs to true.
object
Data details of an ETL. Check EtlData DTO

EtlData DTO

literal
Schema name from the metabase database. It’s in snake_case
Changing this field might result in data loss. The name of the schema should match the one in metabase, otherwise the data won’t be updated correctly.
literal
Database name from metabase. It is also in snake_case.
Changing this field might result in data loss. The name of the database should match the one in metabase, otherwise the data won’t be updated correctly.
array
IDs of the workflow. Typically one ID per workflow. Array of number
array
Filters to remove tables from the ETL. Array of strings
array
Filters to remove columns from table. Array of string.