EcoTable: Cost-effective Table Integration in Data Lakes for Natural Language Queries

Yuhui Wang, Jinqi Liu, Chengliang Chai, Hangyu Zhao, Yuhao Deng, Yuyu Luo, Xin Tang, Ye Yuan, Guoren Wang, Fengjin Wang, Lei CaoarXiv 2026

TL;DR

EcoTable is an automated, query-driven table integration framework designed to seamlessly discover join paths and transform messy data lakes to answer natural language queries. By intelligently combining lightweight deep learning models with Large Language Models (LLMs) via graph-based Steiner tree optimization, it achieves over 30% higher accuracy than state-of-the-art baselines while slashing LLM invocation costs by 5x.

What Problem Does This Paper Address?

Data lakes are massive repositories filled with heterogeneous files (like CSV and Parquet) that lack a unified relational schema. Traditional Extract-Transform-Load (ETL) pipelines require data engineers to manually pre-define a target schema and build complex integration pipelines. This approach breaks down when users issue unforeseen analytical queries that require unexpected table joins or structural transformations (e.g., splitting columns or pivoting data).

While LLMs possess the semantic reasoning capabilities needed to understand and transform these messy datasets, blindly using them to explore every possible join path across a data lake is prohibitively expensive. Because the number of potential join paths grows exponentially with the number of tables, a naive LLM-based approach results in an explosion of API costs and high latency. EcoTable tackles this challenge by building a cost-effective, automated framework that tailors data integration directly to user queries.

Methods

EcoTable models the data lake's search space as a fully connected graph where nodes represent tables and edges represent potential join relationships. The framework operates through three specialized layers:

  1. Table Identification Layer: To avoid overwhelming the LLM, EcoTable uses a two-stage schema linking process. First, a lightweight Pre-trained Language Model (PLM) acts as a cross-encoder to filter out irrelevant tables and ensure high recall. Second, an LLM uses Chain-of-Thought (CoT) reasoning to decompose the user's query and precisely verify which candidate tables contain the necessary columns.
  2. Graph-based Validation Layer: Finding a valid join path often requires "bridging tables" that aren't explicitly mentioned in the user's query. EcoTable formulates this as a Steiner tree search problem on the weighted graph (where edge weights are initialized by a deep learning model predicting joinability). It extracts the most promising paths, batches unverified edges, and sends them to an LLM for validation. Validated edges are cached globally to eliminate redundant LLM calls across overlapping queries.
  3. Table Transformation Layer: Once a valid join path is found, a ReAct-style LLM agent automatically generates executable code to resolve structural discrepancies using four primary operators: Normalize, Split, Pivot, and ValidateJoin. To minimize latency, EcoTable applies Vizing's edge-coloring algorithm to identify independent edges (joins that do not share tables) and executes their transformations concurrently.
Figure 1: An Example of Query-driven Table Integration in Data Lakes.

Datasets

The authors evaluated EcoTable across five distinct benchmarks:

  • DBT Benchmarks (4 datasets): Derived from real-world industrial analytics scenarios (Ad, Engagement, Business, and Platform). These datasets include 35 to 90 tables and over 200 natural language queries requiring complex multi-table joins (averaging up to 4.33 joins per query).
  • NYC Data Lake: A newly introduced, large-scale synthetic benchmark constructed from real-world NYC Open Data to test scalability. It simulates a messy data lake environment with 1,214 tables and 800 queries, heavily injected with case mismatches, typos, missing values, and unaligned schemas.

Key Insights and Ideas

  • The Power of Hybrid Architectures: Small deep learning models are highly cost-effective for coarse-grained filtering (high recall), while LLMs excel at fine-grained semantic verification (high precision). Merging them prevents the exponential cost curve of pure LLM exploration.
  • Steiner Trees for Hidden Joins: Framing data integration as a Steiner tree search allows the system to naturally discover intermediate "bridge" tables that data engineers would normally have to hunt down manually.
  • Global Caching Exploits Query Overlap: In enterprise settings, different analytical queries frequently reuse the same underlying join paths. By caching validated edges globally, EcoTable ensures that an edge is only validated by an LLM once, drastically reducing token consumption.
  • Graph Coloring for Safe Concurrency: Table transformations have strict sequential dependencies. By mapping independent transformations to an edge-coloring problem, EcoTable safely parallelizes LLM code generation without causing cognitive interference or conflicting table states.

Key Results

  • Superior Accuracy: EcoTable significantly outperformed deep learning baselines (like Auto-BI and Auto-Prep), improving join path accuracy (F1-score) by more than 30%. On the massive NYC Data Lake, it maintained a robust F1-score of 65%, whereas pure LLM approaches degraded to 52% due to schema noise.
  • Massive Cost Reductions: EcoTable cut LLM token costs by 5.3x compared to greedy LLM search baselines (SGA), proving its efficiency in large-scale environments.
  • Downstream Text-to-SQL Boost: When integrated with state-of-the-art Text-to-SQL systems (like ReFoRCE), EcoTable significantly improved end-to-end SQL execution success rates by delivering clean, accurately integrated tables.
Comparison of Join Path Accuracy (F1 Score) across different baselines.

Limitations and Future Work

  • Acyclic Join Graphs: EcoTable currently focuses on queries that form acyclic join paths. The authors note that complex queries involving cyclic join graphs remain an open challenge.
  • Single Join Relationships: The framework assumes a single primary join relationship between any pair of tables. Real-world data lakes sometimes feature multiple valid join paths between the same two tables, an area the authors plan to explore in future work.

Summary updated

BibTeX
@misc{wang2026ecotable,
  author = {Yuhui Wang and Jinqi Liu and Chengliang Chai and Hangyu Zhao and Yuhao Deng and Yuyu Luo and Xin Tang and Ye Yuan and Guoren Wang and Fengjin Wang and Lei Cao},
  title = {{EcoTable: Cost-effective Table Integration in Data Lakes for Natural Language Queries}},
  year = {2026},
  eprint = {2606.26613},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2606.26613},
}
Figure