Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Clickhouse Builder Laravel Package

bavix/clickhouse-builder

PHP 7.1+ query builder for ClickHouse. Build and execute SELECT queries with a fluent API: select columns with aliases, closures for complex expressions or subqueries, and integrate with the-tinderbox/clickhouse-php-client for execution.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. Buy: Justify adopting an open-source ClickHouse query builder instead of developing an in-house solution, reducing development time and maintenance overhead.
  • Feature Roadmap: Enable advanced ClickHouse query capabilities (e.g., nested subqueries, temporary tables, async queries) for analytics, real-time reporting, or large-scale data processing.
  • Use Cases:
    • Data Warehousing: Build complex aggregations, joins, and window functions for analytics pipelines.
    • ETL Pipelines: Leverage temporary tables and bulk inserts (insertFiles) for efficient data ingestion.
    • Real-Time Dashboards: Use asyncWithQuery for parallel query execution to reduce latency.
    • Dictionary-Based Lookups: Implement whereDict for dynamic attribute filtering (e.g., user preferences, localization).
    • Laravel/Lumen Integration: Standardize ClickHouse queries alongside existing database operations via Laravel’s DB facade.

When to Consider This Package

  • Adopt if:

    • Your team uses ClickHouse for analytics, OLAP, or real-time data processing.
    • You need PHP-based query building with ClickHouse’s unique syntax (e.g., ARRAY JOIN, SAMPLE, dictGetString).
    • You require Laravel/Lumen integration to unify SQL/ClickHouse queries in a single application.
    • Your use case involves large datasets (e.g., >1M rows) where temporary tables or bulk inserts improve performance.
    • You prioritize developer productivity over raw SQL writing (e.g., fluent API for joins, subqueries, and aggregations).
  • Look elsewhere if:

    • You’re using ClickHouse primarily for OLTP (consider raw SQL or a dedicated ORM).
    • Your stack is non-PHP (e.g., Python, Go, JavaScript).
    • You need real-time transactional consistency (ClickHouse is optimized for analytics, not ACID).
    • The package’s maturity is a concern (low stars, last release in 2026 may indicate stagnation; verify maintenance).
    • You require advanced ClickHouse features not covered (e.g., materialized views, GraphQL integration).

How to Pitch It (Stakeholders)

For Executives:

"This package lets us leverage ClickHouse’s speed and scalability directly from PHP/Laravel, cutting query development time by 40% while enabling advanced analytics features like temporary tables and async queries. For example, we can process 10M+ rows in seconds for real-time dashboards—without hiring specialized ClickHouse engineers. The Laravel integration also reduces technical debt by standardizing our data access layer. Upfront cost: minimal (MIT license); ROI: faster time-to-market for data products."

For Engineering:

*"This is a fluent query builder for ClickHouse in PHP, similar to Laravel’s Eloquent but tailored for ClickHouse’s syntax (e.g., ARRAY JOIN, SAMPLE, dictGetString). Key benefits:

  • Productivity: Chain methods like select()->from()->join() instead of writing raw SQL.
  • Performance: Optimize queries with temporary tables (insertFiles) and async execution (asyncWithQuery).
  • Laravel Ready: Use DB::connection('clickhouse') alongside PostgreSQL/MySQL.
  • Flexibility: Supports subqueries, complex aggregations, and ClickHouse-specific functions out of the box. Tradeoff: Low adoption (0 stars), but the codebase is clean and MIT-licensed. We can contribute or fork if needed."*

For Data Teams:

*"This tool bridges the gap between PHP/Laravel and ClickHouse’s power. Use cases:

  • ETL: Bulk-insert data from files into ClickHouse tables (insertFiles).
  • Analytics: Build nested subqueries or join arrays without SQL boilerplate.
  • Real-Time: Run parallel queries (asyncWithQuery) for low-latency dashboards. Example: Replace a slow Python ETL script with a PHP script that loads 1GB of data in minutes using temporary tables."*
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky