Real Time Reporting (RTR) enables immediate data transformation by transitioning from a traditional batch-based ETL framework to an event-driven architecture. This system is designed to:
- Enhance reporting database freshness
- Support scalable microservices
- Improve access to actionable analytics
RTR uses Kafka to stream change events from transactional data sources into reporting-optimized Kafka topics and the reporting database. This repository consists of two primary packages:
liquibase-service- A job that handles database version control via Liquibase. Deploys stored procedures, tables, and views required for the RTR pipeline.reporting-pipeline-service- Handles all change events (e.g. LDF, People, Observation) and executes post-processing logic to hydrate dimensions, fact tables, and datamarts.
- Please refer to the full setup documentation in the System Admin Guide
- Helm Charts:
- Database Upgrade Notes
- Database Upgrade without Liquibase
To set up a local development environment follow the guide here
Each service has its own suite of test cases. These can be executed with the following command.
./gradlew clean testThe reporting-pipeline-service has an additional set of containerized tests that are divided into unit and functional tests. These unit tests validate stored procedures and the functional tests validate the entire data flow pipeline.
To run only the unit tests in the reporting-pipeline-service
./gradlew clean reporting-pipeline-service:test-unitTo run only the functional tests in the reporting-pipeline-service
./gradlew clean reporting-pipeline-service:test-functionalIf you see unexpected EOF while running containerized tests on Windows, this is usually caused by Testcontainers trying to copy the entire project directory into a container and hitting a locked file.
Issue flow:
- Testcontainers tries to copy your entire project directory into a container.
- It hits a locked file (
checksums.lock). - The copy fails mid-stream.
- Docker receives a broken archive and returns
unexpected EOF. - Testcontainers retries and fails again.
Solution:
Make sure gradlew is stopped, remove the existing cache directory, and create a new one:
./gradlew --stop
Remove-Item -Recurse -Force .gradle -ErrorAction SilentlyContinue
New-Item -ItemType Directory -Force C:\temp\ndr-project-cache | Out-NullWhen running gradlew, specify the cache directory:
./gradlew --project-cache-dir C:\temp\ndr-project-cache clean reporting-pipeline-service:test-functional --infoThis project uses Spotless with Google Java Format to maintain consistent code style.
To check if your code adheres to the formatting standards:
./gradlew spotlessCheckTo automatically apply formatting fixes:
./gradlew spotlessApplyNOTE: Spotless will automatically be applied after you compile your code with ./gradlew compileJava
To run Spotless on a specific file or set of files, you can use the -PspotlessFiles property. Providing this property automatically bypasses the incremental (ratchetFrom) check, allowing you to force-format existing files.
-
Format a specific service (bypasses the incremental check):
./gradlew :liquibase-service:spotlessApply -PspotlessFiles='.*\.java' -
Format a specific file using its relative path:
./gradlew spotlessApply -PspotlessFiles='liquibase-service/src/main/java/MyFile.java' -
Format multiple specific files (comma-separated):
./gradlew spotlessApply -PspotlessFiles='File1.java,File2.java'
Note: If you use a subproject task (e.g.,
:common-util:spotlessApply), you can only target files within that subproject's directory. Use the rootspotlessApplytask if you want to target files across different services using their full repository paths.
Formatting is enforced on all Pull Requests via GitHub Actions. It is recommended to run spotlessApply before committing your changes.
Template for clearance: This project serves as a template to aid projects in starting up and moving through clearance procedures. To start, create a new repository and implement the required open practices, train on and agree to adhere to the organization's rules of behavior, and send a request through the create repo form using language from this template as a Guide.
General disclaimer This repository was created for use by CDC programs to collaborate on public health related projects in support of the CDC mission. GitHub is not hosted by the CDC, but is a third party website used by CDC and its partners to share information and collaborate on software. CDC use of GitHub does not imply an endorsement of any one particular service, product, or enterprise.
- CDC GitHub Open Project Request Form [Requires a CDC Office365 login, if you do not have a CDC Office365 please ask a friend who does to submit the request on your behalf. If you're looking for access to the CDCEnt private organization, please use the GitHub Enterprise Cloud Access Request form.]
- Open Practices
- Rules of Behavior
- Thanks and Acknowledgements
- Disclaimer
- Contribution Notice
- Code of Conduct
Describe the purpose of your project. Add additional sections as necessary to help collaborators and potential collaborators understand and use your project.
This repository constitutes a work of the United States Government and is not subject to domestic copyright protection under 17 USC § 105. This repository is in the public domain within the United States, and copyright and related rights in the work worldwide are waived through the CC0 1.0 Universal public domain dedication. All contributions to this repository will be released under the CC0 dedication. By submitting a pull request you are agreeing to comply with this waiver of copyright interest.
The repository utilizes code licensed under the terms of the Apache Software License and therefore is licensed under ASL v2 or later.
This source code in this repository is free: you can redistribute it and/or modify it under the terms of the Apache Software License version 2, or (at your option) any later version.
This source code in this repository is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Apache Software License for more details.
You should have received a copy of the Apache Software License along with this program. If not, see http://www.apache.org/licenses/LICENSE-2.0.html
The source code forked from other open source projects will inherit its license.
This repository contains only non-sensitive, publicly available data and information. All material and community participation is covered by the Disclaimer and Code of Conduct. For more information about CDC's privacy policy, please visit http://www.cdc.gov/other/privacy.html.
Anyone is encouraged to contribute to the repository by forking and submitting a pull request. (If you are new to GitHub, you might start with a basic tutorial.) By contributing to this project, you grant a world-wide, royalty-free, perpetual, irrevocable, non-exclusive, transferable license to all users under the terms of the Apache Software License v2 or later.
All comments, messages, pull requests, and other submissions received through CDC including this GitHub page may be subject to applicable federal law, including but not limited to the Federal Records Act, and may be archived. Learn more at http://www.cdc.gov/other/privacy.html.
This repository is not a source of government records, but is a copy to increase collaboration and collaborative potential. All government records will be published through the CDC web site.
Please refer to CDC's Template Repository for more information about contributing to this repository, public domain notices and disclaimers, and code of conduct.