Skip to content
プロジェクト

概要

Lakeserve: Ultrafast, realtime database on Iceberg, Spark Connect compatible.

データ・分析

この数値の測り方

計測したスター増加

24時間
履歴を収集中
7日間
履歴を収集中
15日間
履歴を収集中
1か月
履歴を収集中

期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。

Contrast Lakeserve

Contrast Lakeserve

Realtime analytics on Apache Iceberg, compatible with Apache Spark Connect. Written in Rust.

Status: preview. See status.

License: Apache-2.0

Benchmarks · Quickstart · Documentation · Deploying · Continuous integration · Issues

We like building things for the data community, and Lakeserve is one of them. If it's useful to you, star the repo so more people find it. We post what we're working on at contrastdb.com, on X and on LinkedIn.

Overview

Lakeserve is a SQL server for Iceberg tables. Query files from a shell with no server at all, run it on a laptop as a local database with one command, or as a coordinator with workers in front of a catalog and object storage. Clients connect over Apache Spark Connect, so PySpark and other Spark clients work unchanged, or send SQL over HTTP.

Benchmarks

TPC-H, TPC-DS and ClickBench from scale factor 1 to 1000, on one machine and on a cluster: contrastdb.com/bench (contrastdata/lakeserve-benchmarks), with the methodology and how to reproduce them.

Quickstart

Install the latest build for macOS on Apple silicon or Linux on x86-64 or ARM64:

curl -fsSL https://lakeserve.contrastdb.com | sh

The installer checks the download's SHA-256 and puts lakeserve in ~/.local/bin.

Query files right away

lakeserve local runs SQL and exits, with no server or setup, like clickhouse local. Query three million New York taxi trips in a public Parquet file, without downloading it:

lakeserve local -q "SELECT passenger_count, count(*) AS trips, round(avg(total_amount), 2) AS avg_total
  FROM 'https://d37ci6vzurychx.cloudfront.net/trip-data/yellow_tripdata_2024-01.parquet'
  GROUP BY passenger_count ORDER BY trips DESC LIMIT 3"
╭─────────────────┬─────────┬───────────╮
│ passenger_count ┆   trips ┆ avg_total │
╞═════════════════╪═════════╪═══════════╡
│               1 ┆ 2188739 ┆     26.21 │
│               2 ┆  405103 ┆     29.52 │
│            NULL ┆  140162 ┆     25.81 │
╰─────────────────┴─────────┴───────────╯

Your own files work the same way, by path or glob, in Parquet, CSV or JSON, on disk, in S3 or piped in:

lakeserve local -q "SELECT city, avg(fare) FROM 'trips/*.parquet' GROUP BY city"
cat events.csv | lakeserve local -q "SELECT type, count(*) FROM stdin GROUP BY type"
lakeserve local -q "SELECT * FROM 'events.csv'" --format parquet > events.parquet
lakeserve local   # a prompt, with history

See querying files for formats, output, scripts and keeping tables.

Run a local database

lakeserve start keeps Iceberg tables in ~/.lakeserve and serves them to Spark clients, a web UI and HTTP:

lakeserve start

Open the web UI at http://127.0.0.1:15080, or query from a shell:

lakeserve client --query "CREATE TABLE trips (id BIGINT, city STRING, fare DOUBLE)"
lakeserve client --query "INSERT INTO trips VALUES (1, 'Oslo', 12.5), (2, 'Lima', 7.0)"
lakeserve client --query "SELECT city, sum(fare) FROM trips GROUP BY city"

Or connect with PySpark:

from pyspark.sql import SparkSession

spark = SparkSession.builder.remote("sc://127.0.0.1:15002").getOrCreate()
spark.sql("SELECT * FROM trips").show()

Or over HTTP:

curl -s http://127.0.0.1:15080/v1/query -d '{"sql": "SELECT 1 AS one"}'

lakeserve install keeps it running in the background and at every login. See the command line for that, passwords and listening beyond this host.

Learn more

Run it on Contrast

Already on Iceberg in S3? Contrast runs Lakeserve next to your data, with support and an SLA, on tables in buckets you own and on Iceberg tables you already manage. Book a call to set it up.

Status

Lakeserve is preview software. Configuration and on-disk state may change between releases. Structured Streaming and client-sent code (Python, pandas and JVM UDFs, Python data sources) are not supported yet and are rejected with an error. Changes are tested nightly against Spark with the suites in bench/verify; see continuous integration.

Contributing

Bug reports and pull requests are welcome. CONTRIBUTING.md covers building from source and the checks to run, SECURITY.md says how to report a vulnerability, and everyone follows the code of conduct. Questions go to [email protected].

License

Lakeserve is licensed under Apache-2.0. It started as a fork of Sail and has since diverged significantly; it builds on Apache DataFusion. See NOTICE for attribution. Release archives and the container image hold the licenses of the crates the binary links, in THIRD-PARTY-LICENSES.txt.

Apache Spark, Spark, Apache Iceberg, Iceberg, Apache DataFusion, DataFusion, Apache Arrow, Arrow and the Apache feather logo are trademarks of The Apache Software Foundation. Lakeserve is not affiliated with or endorsed by The Apache Software Foundation.

関連プロジェクトを探す

読み込み中…