Skip to main content

Each component with its role
along the data path.

Data arrives, is prepared, becomes available for querying, and feeds the analyses. At each stage, different components meet different needs, and the connections to the systems you already have complete the path.

Who does what along the data path​

Data arrives, is prepared, becomes available for querying and feeds the analyses. At each stage, different components meet different needs.

Some components seem to perform the same function, but each one handles one part of the path, and they can take part in the same solution.

The path of the tables, from storage to maintenance, is in Lakehouse › The data path.

Arrival and coordination: Kafka, NiFi and Airflow​

Events

Apache Kafka

Receives streaming events and keeps them in the topics during the retention period. Different consumers read the same events, and a consumer can read them again to reprocess a period. With Debezium, it captures the changes of PostgreSQL, MySQL, SQL Server and Oracle databases.

Data in transit

Apache NiFi

Collects, transforms and routes data between systems in visual flows, with native processors for Kafka and S3 storage. The provenance recorded along the flow allows tracing the path of each object.

Task coordination

Apache Airflow

It does not process the data: it schedules and tracks workflows defined as DAGs in Python, with the order and the dependencies between the tasks. A task with retries defined can be run again after a failure.

NiFi and Airflow complement each other: the NiFi flow takes the data from the source to the destination, and the Airflow DAG chains the following steps, such as the Spark jobs and the Trino queries.

In the TDP image, Airflow already includes the official providers, PySpark with spark-submit and ClickHouse clients.

Preparation and querying: Spark, Trino and ClickHouse​

Large-scale transformation

Apache Spark

Processes large volumes in batch or streaming, with SQL and machine learning libraries, and writes the result as Iceberg or Delta Lake tables in the lakehouse.

SQL over several sources

Trino

Queries the lakehouse tables through distributed SQL. With the catalogs configured, it combines data from other sources in the same query, such as ClickHouse, Kafka and PostgreSQL.

Fast answers

ClickHouse

Columnar database with its own storage, aimed at low-latency analytical queries, such as those of Superset dashboards and the analysis of logs and metrics.

The three can work in the same solution: Spark prepares the tables, Trino queries them together with other sources, and ClickHouse serves the dashboards where response time is most critical.

Superset, JupyterHub and CloudBeaver bring these results to the analyses, with indicator dashboards, notebooks to explore the data and a web SQL client.

Scenario: from orders to the sales dashboard​

Situation: in an illustrative scenario, orders are recorded in a PostgreSQL database, and the sales department needs indicators in a dashboard and tables to explore in notebooks.

What TDP does: the TDP Kubernetes components split the path into steps:

  1. Capture: a Debezium connector in Kafka Connect publishes the changes of the orders database to Kafka topics.
  2. Transit: a NiFi flow consumes these topics and writes the files to the Ozone S3 storage.
  3. Preparation: an Airflow DAG runs the Spark job that processes the orders and writes an Iceberg table registered in the Hive Metastore.
  4. Querying: Trino reads the table through the iceberg catalog and, with the ClickHouse catalog configured, joins the orders with the data kept in ClickHouse.
  5. Analysis: a Superset dashboard publishes the sales indicators through the connection to Trino, and analysts explore the same table in JupyterHub notebooks.

Effect: the dashboard and the notebooks use the same table.

If the processing rule changes, the events still retained in the topics can be read again to redo the affected period.

The integrations in the example are enabled in the chart values or created in the tools themselves, according to the types shown in the map.

Connections to existing systems​

Transactional databases

The Debezium connectors, optional and enabled per database type, capture the changes of PostgreSQL, MySQL, SQL Server and Oracle and publish them to Kafka.

Other SQL sources

The Trino catalogs connect sources such as ClickHouse, Kafka and PostgreSQL, which remain where they are.

Corporate directory

The components with LDAP or Active Directory integration use the accounts and groups the company already maintains. Details in Security model.

Open formats

The table data is kept in Parquet files, organized in Iceberg or Delta Lake, formats with an open specification read by different engines. Details in Lakehouse.

Each connection receives the endpoints, the credentials and the parameters of the environment, and the available operations depend on the connector and on the source version.

Each connection starts working once it receives these parameters, and adopting existing workloads involves adapting them to these connectors and formats.

See also​