Prerequisites
Before you begin, ensure you have the following installed:PostgreSQL 15+
Metadb stores data in PostgreSQL 15 or later
Go 1.21+
Required to build Metadb from source
GCC 9+
C compiler for building dependencies
Ragel 6
State machine compiler for parsers
You’ll also need a Kafka data source with Debezium configured. See the Kafka Data Sources guide for details.
Installation
Clone and build Metadb
Download the source code and compile:The compiled binary will be in
bin/metadb.Initialize Metadb
Create the data directory and configuration:This creates
data/metadb.conf which you’ll configure in the next step.Create Your First Data Source
Connect to Metadb usingpsql:
After creating a data source, Metadb enters synchronizing mode. When the initial snapshot completes, you’ll see “source snapshot complete (deadline exceeded)” in the logs.
Complete Initial Synchronization
After the snapshot finishes streaming:Query Your Data
Reconnect to Metadb and explore the synchronized tables:Understanding Table Metadata
Every Metadb table includes these metadata columns:__id- Unique row identifier (Metadb-managed)__start- When this version of the row became active__end- When this version was superseded (or9999-12-31if current)__current- Boolean indicating if this is the current version__origin- Optional identifier for grouping related data
Configure JSON Transformation
If your data includes JSON columns, you can automatically flatten them:sensor_inventory__t and sensor_inventory_t) with JSON fields as columns.
Common Commands
Here are essential commands for working with Metadb:Next Steps
Core Concepts
Learn about data sources, table types, and transformations
Administration Guide
Configure Metadb for production use
User Guide
Master querying and reporting techniques
CLI Reference
Explore all available CLI commands
Troubleshooting
Server won't start
Server won't start
Check the log file (
metadb.log) for errors. Common issues:- PostgreSQL connection failed (verify credentials in
metadb.conf) - Port 8550 already in use (use
--portflag to change) - Database permissions insufficient (ensure superuser and systemuser exist)
Data not appearing in tables
Data not appearing in tables
Verify:
- Data source is created:
list data_sources; - Kafka topics are streaming: Check Kafka connector status
- Schema filters aren’t blocking tables: Review
schema_stop_filterandtable_stop_filter
Synchronization taking too long
Synchronization taking too long
This is normal for large datasets. Monitor progress:Look for “source snapshot complete” message in logs.
