Data engineering at the Observatory · in production since 2025
Observatory data lake
The Acre Industry Observatory's data foundation, on Azure. It takes in public data on jobs, foreign trade and companies, cleans it, checks it and gets it ready for dashboards and reports. I led the architecture and development, together with the Observatory team.
- Role
- Architecture and lead development
- Stack
- Python, PySpark, Databricks, Delta Lake, Unity Catalog, Azure Data Factory, Azure Data Explorer, ADLS Gen2, KQL.

Context
The Acre Industry Observatory publishes analysis on the state's jobs, foreign trade and companies, and all of it depends on public data. The lake does the heavy lifting: it downloads the source, keeps the original, cleans it, checks it and publishes it to Azure Data Explorer1. The platform, the bulletins and the reports all query it from there, in KQL2.
1 Microsoft's database built to query a lot of data fast. It's where the ready-to-use data lives.2 Azure Data Explorer's query language. It looks like SQL, but it was made for large volumes.Decisions
- Testing pipelines straight in the cloud costs money on every run.
- I wrote a Python engine that runs the same on my machine and on Databricks3. Every pipeline4 passes local tests before it ships, at no cost.3 A cloud platform that processes large amounts of data in parallel, splitting the work across many machines.4 An automatic sequence of steps that takes data from the source to where it's used: download, clean, check, publish.
- Every agency publishes in a different format.
- Every source follows the same staged template (bronze, silver and gold5), with separate dev and prod catalogs. A new source reuses the template instead of inventing another one.5 Three stages of data: bronze is the original as it arrived, silver is cleaned and checked, gold is ready for charts and reports.
- Reprocessing a month must never duplicate a row.
- Loads are idempotent6 and every raw file gets a SHA-2567 hash. Running it again gives the same result.6 Running it again changes nothing: the second run gives the same result as the first, with no duplicates.7 A file's fingerprint. If a single byte changes, the fingerprint changes.
- Azure Data Explorer bills for every hour it's on.
- An automation shuts the cluster8 down outside working hours.8 The group of cloud machines that answers the queries. While it's on, it bills.
Results
- In production, orchestrated by Azure Data Factory on daily and monthly triggers.
- Processes Brazil's formal employment and hiring records, foreign trade, company registry, social security and census data, among other public sources.
- Feeds the platform dashboards, the monthly foreign trade bulletin and the Acre Exports Overview 2021–2025 report.