Skip to content

twintag/fosdemdemo2026

Repository files navigation

Fosdem Demo 2026

A demonstration of DataFusion's federation capabilities with a Flight SQL server that connects to MySQL, PostgreSQL, and SQLite databases simultaneously.

Architecture

image info

Quick Start

1. Setup Environment

# Copy the environment template
cp .env.example .env

# Edit .env with your database credentials (optional)
# Default values will work with the provided docker-compose

3. Start Test Databases

# Start MySQL and PostgreSQL containers
docker-compose up -d

# This will:
# - Start MySQL on port 3306 with sample user_table
# - Start PostgreSQL on port 5432 with sample product_table

4. Build and Run the Server

# Run the Flight SQL server
RUST_LOG=info cargo run

The server will start on 0.0.0.0:50051 by default.

Name Mapping

The minimal storage rewrite rule demonstrates API-to-storage name transformation:

Table Mappings

API Name Storage Name (Database)
users user_table (MySQL)
products product_table (PostgreSQL)
orders order_table (SQLite)

Column Mappings

Users Table:

API Name Storage Name
userId user_id
firstName first_name
lastName last_name
email email_address
createdAt created_at

Products Table:

API Name Storage Name
productId product_id
productName product_name
price unit_price
ownerId owner_id
stockQuantity stock_qty

Orders Table:

API Name Storage Name
orderId order_id
userId user_id
productId product_id
orderDate order_date
totalAmount total_amount

Example Queries

Once the server is running, you can connect with any Flight SQL client and run queries using the API names:

Simple Query (Single Database)

-- This queries MySQL (user_table)
SELECT userId, firstName, lastName
FROM users
WHERE email = 'john.doe@example.com';

Cross-Database Federation Query

-- Joins across MySQL, PostgreSQL, and SQLite
SELECT
    u.firstName,
    u.lastName,
    p.productName,
    o.totalAmount,
    o.orderDate
FROM users u                    -- MySQL
JOIN orders o ON u.userId = o.userId  -- SQLite
JOIN products p ON o.productId = p.productId  -- PostgreSQL
WHERE o.totalAmount > 100
ORDER BY o.orderDate DESC;

References

About

This is a demo for our presentation at FOSDEM 2026.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages