Spotify、データレイク上で低遅延ポイントクエリを可能にする外部インデックス構築
本文の状態
日本語全文を表示中
詳細モードで約6分の本文を読めます。
同じ出来事の情報源
この情報源を基点に整理
InfoQ AI/ML
Spotify はデータレイク内の個別レコード取得を高速化する外部インデックス「Random Access Parquet (RAP)」を導入し、分析用と運用用のデータ複製を不要にする技術を発表した。
Continue in AI NEW LAB
このニュースを、実務の判断につなげる
AI NEW LABで、試したことや先に確認したい条件を共有できます。まずはログインなしで読めます。
AI NEW LABで論点を見るAI深層分析を開く2026年8月13日 00:51
AI深層分析
キーポイント
外部インデックスによる高速検索の実現
Apache Parquet ファイル上に外部インデックス層を追加することで、キーベースの個別レコード取得を数千ファイルのスキャンなしで可能にする仕組みを提供する。
データ複製コストの削減とアーキテクチャ統合
分析、機械学習、オンラインサービス用の同一データセットを維持しつつ、大規模なデータ複製を不要にし、ストレージコストと管理負荷を大幅に低減する。
Apache Iceberg との親和性
新しいデータ書き込み時にインデックスビルダーが追加型インデックス断片を生成し、不変の Parquet ファイルや既存の Iceberg テーブルを変更せずに動作する。
業界全体におけるデータレイクの変革
Google Cloud の取り組みとも類似するが、RAP は点検索に特化した専用インデックス層を導入することで、データレイクを分析と運用の両方で効率的に利用可能にする。
ストレージレイアウトの最適化
Spotify は検索キーによるソートや関連レコードのグループ化、値カラムのインターリーブなどにより、数キロバイトの単一範囲読み取りでポイントクエリを処理可能にした。
重要な引用
Spotify has introduced Random Access Parquet (RAP), a storage architecture that enables low-latency point queries directly against data stored in its data lake
Instead of scanning thousands of files, a query resolves the key through the index before issuing a targeted ranged read against object storage.
The approach allows the same datasets to support analytical processing, machine learning pipelines, notebooks, AI agents, and latency-sensitive online applications without maintaining duplicate storage systems.
Storage layout techniques such as Z ordering and Hilbert curves can further improve data locality for secondary lookup dimensions.
編集コメントを表示
編集コメント
Spotify が実装した RAP は、データレイクを分析と運用の両方で効率的に利用する現実的な解決策として注目される。同様の課題を抱える大規模データ環境を持つ企業にとって、複製コスト削減のための有力な選択肢となる可能性がある。
Source Article
元記事を日本語で読む
本文に関係しない購読案内、埋め込み通知、サイト内プロモーションは除いています。
Spotify は、データレイクに保存されたデータに対して低遅延の個別レコード照会を可能にするストレージアーキテクチャ「Random Access Parquet (RAP)」を導入しました。これにより、オンラインサービスや AI アプリケーションは、データを運用データベースへ複製することなく、個々のレコードを直接取得できるようになります。RAP は Apache Parquet ファイルの上に外部インデックス層を追加するもので、分析や機械学習、オンライン提供に同じデータセットを使い続ける一方で、対話型の照会も可能にします。
Spotify によると、現代のデータレイクは分析および AI ワークロードの中核リポジトリとなっていますが、個別レコードの取得は依然として非効率です。Trino や BigQuery などの分散型クエリエンジンは、キーベースの照会ではなく分析スキャンに最適化されているためです。Google Cloud Storage などのクラウドオブジェクトストレージではミリ秒単位のアクセス遅延が可能になっていますが、点照会においてはクエリの計画策定、メタデータの走査、ファイルの発見処理が大きなオーバーヘッドとなる場合があります。Spotify は、オンラインデータをペタバイト規模で Bigtable に保存し、エクサバイト規模のデータを Google Cloud Storage ベースのデータレイクに保管しています。大規模な運用データベースへの複製はコスト増につながるため、この課題を解決する必要性がありました。
RAP は、ユーザー ID などのルックアップキーを直接 Parquet ファイルや行の位置にマッピングする外部インデックスを導入することで、この課題に対処します。数千ものファイルをスキャンする必要はなく、クエリはまずインデックスを通じてキーを解決し、その後オブジェクトストレージに対して対象となる範囲読み取りを実行します。
新しいデータが Apache Iceberg テーブルに書き込まれると、インデックスビルダーが不変の Parquet ファイルを変更することなく、追加専用(append-only)のインデックスクラスタを生成します。Spotify によると、このアプローチにより、分析処理、機械学習パイプライン、ノートブック、AI エージェント、そしてレイテンシに敏感なオンラインアプリケーションをすべてサポートできるようになります。重複するストレージシステムを維持する必要はありません。
Spotify の発表は、オープンデータレーク技術の活用範囲を分析処理から広げようとする更なる取り組みの一環です。Google Cloud も最近、AI アプリケーション向けに Apache Iceberg ベースのレイクハウスアーキテクチャ を紹介し、同様にデータ重複の削減とオペレーショナルなデータアクセスの実現を目指しています。しかし、そのアプローチとは異なり、RAP は既存の Parquet ファイルや Iceberg テーブルとの互換性を保ちつつ、ポイントルックアップに最適化された専用インデックス層を導入します。
このアーキテクチャは、データエンジニアリングコミュニティ内でも議論を呼んだ。Andrew Lamb は、オープンなデータフォーマットを対話型ワークロード向けに拡張する例として RAP を挙げた。一方、Vikas Singh は LinkedIn の別スレッドで、クラウドオブジェクトストレージのパフォーマンス向上により、ポイントクエリに関連するレイテンシの多くがクエリ計画やメタデータアクセスに移行したと指摘。RAP は事前計算されたインデックスを通じてこの領域を削減するために設計されている。
Spotify はまた、ポイントクエリのレイテンシを低減させるストレージ配置の最適化手法も紹介している。具体的には、検索キーでデータをソートしてアクセスするファイル数を減らす、関連レコードをグループ化する、値カラムをインターリーブさせて単一の連続読み取りで複数の属性を取得できるようにする、そして Parquet ファイルを読まずにクエリを満たせるカバーインデックスを活用するといった手法だ。Spotify によると、これらの技術はファイルやインデックスのサイズがわずかに増える代償としてストレージ操作回数を減らし、一部のポイントクエリを数キロバイト単位の単一レンジ読み取りだけで処理可能にするという。

複数の列から関連する値を並列に配置する「インタリーブ値カラムレイアウト」により、効率的なデータアクセスが可能になります(出典:Spotify Blog Post)。
Spotify ではセカンダリインデックスもサポートしており、バイヤー ID やセラー ID といった複数の検索軸に対して、Parquet ファイル を書き換えることなく効率的なクエリを実行できます。ハッシュベースのインデックスは完全一致検索を、ソート済みインデックスは範囲検索を実現します。Spotify によれば、セカンダリインデックスはサービングレイヤーで管理されるため、データパイプラインを変更することなく新しいアクセス経路を追加でき、分析用スキャンと対話型ポイント検索の両方で同じ Parquet データセットを継続して利用できます。また、Z オーダー や ヒルベルト曲線 といったストレージレイアウト技術を活用することで、セカンダリ検索軸におけるデータの局所性をさらに向上させることが可能です。
著者について
リーラ・クミリ
リーラはスターバックスのシニアソフトウェアエンジニアです。スケーラブルでクラウドネイティブなシステムや分散プラットフォームの構築に深い専門知識を持ち、Rewards Platform のアーキテクチャ設計、納品、運用の卓越性を牽引しています。システムの近代化、スケーラビリティの向上、信頼性の強化に向けた取り組みを主導しています。
技術的なリーダーシップに加え、リーラは組織の AI チャンピオンとしても活躍し、LLM ベースのツールを活用して開発者の生産性やワークフローを改善する機会を発見するとともに、AI 導入におけるベストプラクティスの確立にも尽力しています。彼女は本番環境で使えるシステムの構築、開発者体験の向上、そしてエンジニアが技術面と戦略面の両方で成長できるよう指導することに情熱を注いでいます。関心のある分野は、プラットフォームエンジニアリング、分散システム、開発者の生産性、そして技術的なソリューションをビジネスや製品の目標に結びつけることです。
もっと見る
表示しない
原文を表示
Spotify has introducedRandom Access Parquet (RAP), a storage architecture that enables low-latency point queries directly against data stored in its data lake, allowing online services and AI applications to retrieve individual records without replicating datasets into operational databases. RAP adds an external indexing layer over Apache Parquet files, enabling interactive lookups while continuing to use the same datasets for analytics, machine learning, and online serving.
Spotify explained that modern data lakes have become the central repository for analytical and AI workloads, but retrieving individual records remains inefficient because distributed query engines such as Trino andBigQuery are optimized for analytical scans rather than key-based lookups. Although cloud object stores such asGoogle Cloud Storage now provide millisecond access latency, query planning, metadata traversal, and file discovery can add significant overhead for point queries. Spotify noted that it stores petabytes of online data in Bigtable while exabytes reside in its Google Cloud Storage-based data lake, making large-scale replication into serving databases increasingly costly.
RAP addresses this challenge by introducing an external index that maps lookup keys, such as user IDs, directly to Parquet files and row locations. Instead of scanning thousands of files, a query resolves the key through the index before issuing a targeted ranged read against object storage. As new data is written intoApache Iceberg tables, an index builder generates append-only index fragments without modifying immutable Parquet files. Spotify said the approach allows the same datasets to support analytical processing, machine learning pipelines, notebooks, AI agents, and latency-sensitive online applications without maintaining duplicate storage systems.
Spotify's announcement follows broader efforts to extend open data lake technologies beyond analytical processing. Google Cloud recently described anApache Iceberg based lakehouse architecture for AI applications that similarly seeks to reduce data duplication while enabling operational access to data. Unlike that approach, RAP introduces a dedicated external indexing layer optimized for point lookups while remaining compatible with existing Parquet files and Iceberg tables.
The architecture also generated discussion within the data engineering community.Andrew Lamb highlighted RAP as an example of extending open data formats for interactive workloads. In a separate LinkedIn discussion, Vikas Singh argued that improvements in cloud object storage performance have shifted more of the latency associated with point queries toward query planning and metadata access, an area that RAP is designed to reduce through precomputed indexes.
Spotify also described several storage layout optimizations that reduce point query latency. These include sorting data by lookup key to reduce the number of files accessed, grouping related records together, interleaving value columns so multiple attributes can be retrieved through a single contiguous read, and using covering indexes that can satisfy some queries without reading Parquet files. According to Spotify, these techniques trade modest increases in file or index size for fewer storage operations, allowing some point queries to be served through a single ranged read of only a few kilobytes.

Spotify also supports secondary indexes, enabling efficient querying across multiple lookup dimensions, such as buyer ID or seller ID, without rewriting Parquet files. Hash-based indexes support exact lookups, while sorted indexes enable range queries. Spotify said secondary indexes are managed at the serving layer, allowing new access paths without changing data pipelines while continuing to use the same Parquet datasets for both analytical scans and interactive point lookups. Storage layout techniques such asZ ordering andHilbert curves can further improve data locality for secondary lookup dimensions.
About the Author
Leela Kumili
Leela is a Lead Software Engineer at Starbucks with deep expertise in building scalable, cloud-native systems and distributed platforms. She drives architecture, delivery, and operational excellence across the Rewards Platform, leading efforts to modernize systems, improve scalability, and enhance reliability.
In addition to her technical leadership, Leela serves as an AI Champion for the organization, identifying opportunities to improve developer productivity and workflows using LLM-based tools and establishing best practices for AI adoption. She is passionate about building production-ready systems, enhancing developer experience, and mentoring engineers to grow in both technical and strategic impact. Her interests include platform engineering, distributed systems, developer productivity, and bridging technical solutions with business and product goals.
Show moreShow less
今日のまとめ
AIデイリーブリーフで今日の重要ニュースをまとめ読み