ApiTap โ€“ Stream APIs to PostgreSQL with SQL and Built-in Scheduler

โš“ Rust    ๐Ÿ“… 2025-12-08    ๐Ÿ‘ค surdeus    ๐Ÿ‘๏ธ 9      

surdeus

Warning

This post was published 61 days ago. The information described in this article may have changed.
# ApiTap: Stream APIs to PostgreSQL with SQL + Built-in Scheduler

Hi everyone! ๐Ÿ‘‹

I'm excited to share **ApiTap**, a Rust-based ETL tool I've been working on. It makes API-to-database pipelines incredibly simple using SQL transformations.

## What is it?

ApiTap lets you write SQL to transform API data and load it into PostgreSQLโ€”no Python scripts needed.

**Quick example:**

```sql
{{ sink(name="postgres_sink") }}
{{ schedule("0 */5 * * * *") }}  -- Every 5 minutes

SELECT 
    id,
    user_id,
    created_at
FROM {{ use_source("api_data") }}
WHERE status = 'active';

That's it. ApiTap handles pagination, retries, and scheduling automatically.

Key Features

  • :white_check_mark: SQL-first - Write transformations in SQL, not code
  • :white_check_mark: Built-in scheduler - Cron-based automation (no Airflow needed)
  • :white_check_mark: Smart pagination - LimitOffset, PageNumber, PageOnly modes
  • :white_check_mark: PostgreSQL 14-17 - Full support with optimized MERGE operations
  • :white_check_mark: Production-ready - Profiled with flamegraph, optimized for performance

Tech Stack

Built on solid Rust foundations:

  • Apache DataFusion for SQL execution
  • Tokio for async runtime
  • Minijinja for SQL templating
  • tokio-cron-scheduler for job scheduling

Architecture

  • Optimized batch processing (5000 rows per batch)
  • Lock-free atomic operations
  • Zero-copy streaming where possible
  • Efficient async I/O with Tokio

Why I Built This

I was tired of writing boilerplate Python scripts for every API integration. Wanted something fast, simple, and production-ready. Rust seemed perfect for the job.

Links

Feedback Welcome!

This is my first major Rust project. I'd love to hear:

  • What features would make this more useful?
  • What integrations do you need?
  • Any architectural feedback?

Contributions and PRs are very welcome!


Built with :heart: and Rust :crab:

1 post - 1 participant

Read full topic

๐Ÿท๏ธ Rust_feed