Template repository for creating QQQ Data QBits - reference data with table prefixing, sync processes, and Liquibase generation.
Data QBits provide reusable reference data sets that applications consume. They support:
- Table prefixing for multi-instance deployment
- Sync processes with natural key upsert
- Liquibase generation for schema management
- PossibleValueSources for dropdown lookups
- Click "Use this template" to create your QBit
- Run
scripts/customize_template.pyto rename the example - Define your entity classes
- Add reference data JSON files
- Implement sync process
- Generate Liquibase changelog
src/main/java/com/kingsrook/qbits/example/
├── ExampleDataQBitConfig.java # Extends AbstractDataQBitConfig
├── ExampleDataQBitProducer.java # Extends AbstractDataQBitProducer
├── model/
│ ├── ExampleEntity.java
│ └── ExampleChildEntity.java
├── sync/
│ └── ExampleDataSyncProcess.java
└── liquibase/
└── ExampleLiquibaseGenerator.java
- Table prefixing -
shipping_country,billing_country - Multi-instance - Same QBit deployed multiple times
- Sync process - Upsert by natural key
- Liquibase generator - Template-based, prefix-aware
// Shipping addresses
new GeoDataQBitProducer()
.withConfig(new GeoDataQBitConfig()
.withBackendName("rdbms")
.withTableNamePrefix("shipping"))
.produce(qInstance, "shipping-geo");
// Billing addresses
new GeoDataQBitProducer()
.withConfig(new GeoDataQBitConfig()
.withBackendName("rdbms")
.withTableNamePrefix("billing"))
.produce(qInstance, "billing-geo");AGPL-3.0 - See LICENSE