Four challenges,
four designs with TDP.
A legacy system that cannot be touched, decisions that must happen together with the event, areas with different truths about the same subject, and models that depend on reliable data. For each case, a design with the TDP components in the role the configuration guides document.
The designs are illustrative. Each section says where the situation usually appears, what the platform does and what stays in the organization's systems.
- A single data view over legacy systems
- Real-time decisions on events
- A single record across areas
- Machine learning on the platform data
A single data view over legacy systems
An old system keeps the registry that everyone needs. It cannot be modified, and the production database cannot be overloaded.
Where it appears: an ERP or a central registry that several applications query; a service center that needs the complete view of the customer; portals that today read the source database directly.
The design:
- Capture without touching the legacy: a Debezium connector, in Kafka Connect, reads the database transaction log and publishes each change in the registry as an event. The legacy application does not change, and there are no extraction queries against the production database.
- The other sources come in by batch or by API: NiFi flows fetch the data from files, APIs and other systems and write it to the Ozone S3 storage.
- Three layers of tables: Spark jobs, scheduled by Airflow, write the raw data as it arrived, then the processed and integrated data, with the sources joined by common keys, and finally the ready-made indicators. All as Iceberg or Delta Lake tables registered in the Hive Metastore.
- Consumption by SQL: Trino queries the tables and serves the Superset dashboards and the organization's applications.
- Cross-cutting governance: in Ranger, group policies decide who sees each column, mask documents and contact details for those who do not need the real value, and record each decision in the audit. OpenMetadata maintains the catalog and the lineage of the tables.
| Component | Role in this design |
|---|---|
| Kafka with Debezium | Capture of the legacy database changes, without modifying the application |
| NiFi | Load of the other sources by batch or by API, into the S3 storage |
| Spark and Airflow | Raw, integrated and indicators layers, in scheduled jobs |
| Ozone, Iceberg or Delta Lake, Hive Metastore | Lakehouse tables and the catalog that Spark and Trino share |
| Trino and Superset | SQL over the tables, for the dashboards and the applications |
| Ranger and OpenMetadata | Profiles, masks, audit, catalog and lineage |
The legacy and the applications that consume the data. The platform receives from them and delivers to them.
Real-time decisions on events
Events arrive all the time, but irregularities only show up later, through sampling and manual cross-checks.
Where it appears: transactions that need verification on the spot; sensor readings and operation logs; passages through checkpoints; orders that must be checked against limits and restriction lists.
The design:
- Everything becomes an event: business events, signals and reference data, such as lists and limits, enter Kafka topics.
- Rules with state and time: a Flink job keeps the state per key, such as a customer, an order or a piece of equipment, matches each event against the reference data and the history of that key, compares the observed sequence with the expected one in event time and detects patterns with the CEP library. Checkpoints recover the state after a failure, without counting an event twice.
- Decisions at the moment of the event: each triggered rule becomes an event in a decisions topic, with the alert or the action, which the organization's systems consume.
- History for analysis: the events and decisions are written to HDFS, in Hive tables, and feed the Superset operations dashboards.
- Cross-cutting governance: Ranger applies team policies on Kafka and Hive, and Kerberos authenticates the services.
| Component | Role in this design |
|---|---|
| Kafka | Input event topics and the decisions topic |
| Flink | State per key, event-time rules, CEP and checkpoints |
| HDFS and Hive | History of the events and decisions, in tables |
| Superset | Operations dashboards over the history |
| Ranger and Kerberos | Team policies and service authentication |
Those that emit the events and those that act on each decision, such as a portal, a field application or an order system.
A single record across areas
Each area keeps its own registry of the same subject. The numbers do not add up, and the same person or product shows up in different ways.
Where it appears: customers registered by sales, billing and support; suppliers and contracts in purchasing and finance systems; products with different codes per channel; programs of the same organization that serve the same public.
The design:
- Inputs: the registries and the reference data come in through NiFi, in batch, and the registries kept in SQL databases come in through Kafka, as changes captured by Debezium.
- Raw: each source becomes a table with the records as they arrived. Nothing is corrected here, which allows the following layers to be redone.
- Integrated: Spark jobs standardize the fields and join the registries by common keys, in one table per subject: customer, supplier, product, contract. The OpenMetadata quality tests, at table and column level, check whether the data is complete, up to date and correct, and the lineage shows which registry each field came from.
- Indicators: ready-made tables per area and per period, queried by Trino, published in Superset and explored in JupyterHub notebooks.
- Cross-cutting governance: in Ranger, each area sees the columns that its purpose requires, in each layer.
| Component | Role in this design |
|---|---|
| NiFi and Kafka with Debezium | Input of the registries in batch and by change capture |
| Spark and Airflow | Raw, integrated and indicators layers, in scheduled jobs |
| Ozone, Iceberg or Delta Lake, Hive Metastore | Lakehouse tables and the shared catalog |
| OpenMetadata | Quality tests and lineage of the integrated tables |
| Trino, Superset and JupyterHub | SQL, dashboards per area and analyses in notebooks |
| Ranger | Who sees each column of each layer |
The systems of each area remain as the source. The business rules of each one stay in them.
Machine learning on the platform data
A model needs the data that the platform already integrates, and the result must reach those who decide, without copies leaving the platform.
Where it appears: classifying tickets, orders or documents by subject; estimating demand, risk or deadlines; detecting records outside the pattern.
The design:
- The source is the integrated layer: the subject table, already standardized and governed, is the training set.
- Training in the cluster: in the JupyterHub notebook, the PySpark from the TDP image reads the table and trains the model with Spark MLlib, in the cluster itself. The table version used in training remains available through time travel, to reproduce the result.
- The result goes back as a table: the classifications, scores or predictions are written to the lakehouse, in a table with its lineage recorded in OpenMetadata.
- Consumption: Trino queries the results, Superset publishes them in a dashboard, and the organization's applications consume the result and act on it.
- Cross-cutting governance: Ranger decides who reads the integrated table and the results table.
| Component | Role in this design |
|---|---|
| Ozone, Iceberg or Delta Lake | Integrated table, version used in training and results table |
| JupyterHub | Notebook with the PySpark from the TDP image |
| Spark | Training with MLlib, in the cluster |
| Trino and Superset | Querying and dashboard of the results |
| OpenMetadata and Ranger | Lineage of the results table and who reads it |
The applications that act on each result, such as routing a ticket or prioritizing an order.