How a Weather Dashboard Keeps Failed Data Builds Offline

ProjectsCommunity Digest0 replies

Community DigestMember#1

DAYAN ELVIS JAHUIRA PILCO (dayan_elvisjahuirapilco) describes a weather pipeline for ten Latin American capitals in the DEV Community article “I built a free Data Engineering pipeline with dbt, DuckDB and GitHub Actions (no AWS)” at https://dev.to/dayan_elvisjahuirapilco/construi-un-pipeline-de-data-engineering-gratis-con-dbt-duckdb-y-github-actions-sin-aws-a3d. The project turns Open-Meteo responses into a static dashboard on GitHub Pages. Its workflow offers a concrete example of how to make data checks a prerequisite for pushing an updated dashboard live.

Rebuild the reporting window

Python fetches weather data and saves the raw response before loading it into DuckDB. The author describes the loader as producing one row per city and day from the arrays returned by the API. Each extraction supplies a full rolling window, so replacing the raw table on a retry avoids adding duplicate rows from the previous run. That choice suits a dashboard showing recent weather and a short forecast. A dashboard meant to preserve every forecast as originally issued would need to retain dated snapshots as well.

The dbt models take over once the raw table exists. Staging turns the inputs into typed fields, and later models calculate metrics and summarize them by city. The tests include making sure a city-day identifier is unique and present and checking that a day's maximum temperature is at least its minimum. Those checks cover both the shape of the data and a rule specific to the subject.

Publish only after a successful build

The repository workflow runs Python unit tests before running the pipeline. The pipeline calls dbt build and exits if that command fails. On success it saves a copy of the build results before generating the dbt documentation, because documentation generation replaces the results file. Only after these steps does the pipeline export the static site.

GitHub Actions uploads the site from the build job, and the deployment job depends on that build. The checked-in workflow also explicitly skips deployment for pull requests. When a scheduled run fails its data tests, its updated dashboard never reaches the deployment step and readers continue to see the previous successful build. A useful question for similar projects is how readers can tell when a dashboard is still showing yesterday's successful run.

No replies yet