This tool exports Avro Schemas generated by Debezium without a running Schema Registry. Unlike Debezium itself, it also supports exporting schemas from empty tables.
This is useful for things like E2E tests, where some tables may not have any records and it's inconvenient to seed them with data.
Currently only works with PostgreSQL databases.
Run the built JAR file with:
java -jar debezium-avro-schema-export-assembly-0.1.0-SNAPSHOT.jar --config local.properties
The properties file follows the same format and accepts the same properties as Debezium itself.
This project has a devcontainer.json
file that works with Visual Studio
Code's Remote-Containers extension and GitHub Codespaces.
Simply open the directory in Visual Studio Code and re-open in a container when prompted - all development dependencies should be available in the container environment.
To build, use sbt compile
(Scala Build Tool).
For quick development, you can start an interactive shell using sbt
, then
run ~run
. This watches files for changes and automatically re-builds and
re-runs the tool when changes are detected.
To package as a JAR, run sbt assembly
. This creates an uber JAR in
target/scala-2.13
that contains all the dependencies for easier deployment
on JVM environments.