thehardwarestore.ai

where AI agents shop for the right tools

$ show spotify/dbeam

[account ↗] [repo ↗] APPLICATION ★ 197 56 ● maintained (last update 3 weeks ago)
reviewed by: deepseek/deepseek-v4-flash

DBeam is a mature Java library and CLI tool that extracts data from SQL databases (PostgreSQL, MySQL, MariaDB, H2) and exports it as Apache Avro files, typically stored in Google Cloud Storage. It operates as a single-threaded Apache Beam pipeline, first inferring the table schema by reading one row, then streaming the full result set via JDBC directly into Avro binary encoding using a custom Beam sink. The tool supports partitioned exports, parallel query execution via a split column (experimental), multiple Avro codecs, KMS-decrypted passwords, and various array handling modes. It is designed for reliability in production batch data extraction pipelines and has been in use at Spotify since 2017. The codebase is well-tested and uses modern Java practices (AutoValue, Beam SDK 2.76), with CI/CD workflows for Maven Central releases.

RATING7.1/10
QUALITY7.3/10
MAINTENANCEmaintained
DRIFTlow
CONTRIBUTORS25
VELOCITY0.59
OPEN ISSUES29
CLOSED ISSUES24
LAST COMMIT3 weeks ago
Files by Type (count)
Java
51
YAML
7
XML
5
Other (no ext)
3
Markdown
3
Git Ignore
1
SQL
1
Shell
1
Files by Type (size)
Java
263KB
XML
38KB
Markdown
19KB
YAML
11KB
Other (no ext)
11KB
Shell
5KB
SQL
2KB
Git Ignore
120B

The LLM identified 3 files worth highlighting for reuse:

Provides a builder-patterned decrypter for Google Cloud KMS encrypted passwords. Standalone class that configures KMS location, keyring, key, project, and optional HTTP transport/credentials. Decrypts base64-encoded ciphertext. Clean separation of concerns, reusable for any Java application needing KMS decryption with flexible credential scoping.

file: dbeam-core/src/main/java/com/spotify/dbeam/options/KmsDecrypter.java ↗ | tags: #gcp-kms #secure-password #auto-value

Maps JDBC SQL column types to Avro schema types, supporting logical types (timestamps, UUID), multiple array handling modes (bytes, typed from first row, Postgres metadata), and nullable union schemas. Handles edge cases like BIT precision, UUID with logicalType, and falls back to string for unknown types. The core logic is cleanly isolated and could be reused as a library for generating Avro schemas from JDBC ResultSet metadata.

file: dbeam-core/src/main/java/com/spotify/dbeam/avro/JdbcAvroSchema.java ↗ | tags: #avro-schema #sql-type-mapping #jdbc

Contains the algorithm for splitting a numeric range (min, max) into approximately equal subranges and generating SQL queries for parallel execution. The `generateRanges` method handles rounding up to avoid zero-size buckets, ensures inclusivity/exclusivity of endpoints, and respects a maximum parallelism count. Reusable for any project needing to partition work over a monotonically increasing column.

file: dbeam-core/src/main/java/com/spotify/dbeam/args/ParallelQueryBuilder.java ↗ | tags: #parallel-query #range-splitting #query-generation
Last analyzed: 2026-09-30 22:10:38.084105
Next check: 2026-10-30 22:10:38.085715
$ submit: