Skip to main content

Rowbase SDK — declare data pipelines as Python functions

Project description

Rowbase SDK

Status: Alpha
Python: 3.12+
Core Dependencies: Polars, Pydantic, Typer


Overview

Rowbase SDK is a Python library for Rowbase engineers to author data pipelines. These pipelines are then deployed and made available to non-technical customers who simply upload their data and receive cleaned results.

Key positioning:

  • Agentic authoring — Rowbase engineers write pipelines (often with AI assistance)
  • Invisible to users — Customers never see the code; they just upload files and get results
  • B2B data cleaning — Customers are non-technical business users who need clean data

Who Uses This

User Use Case
Rowbase Engineers Write pipelines using the SDK, deploy via CLI
End Customers Upload data via web UI, download cleaned results

The customer never interacts with the SDK directly.

Installation

pip install rowbase
# or: uv add rowbase

Quick Start

from rowbase import pipeline, source, dataset

@pipeline
def orders_etl():
    # Declare input sources
    orders = source("orders", columns=["order_id", "customer", "amount", "status"])
    customers = source("customers", columns=["customer_id", "name", "email"])
    
    # Transform: filter to completed orders
    @dataset(name="completed_orders", data_from=orders)
    def filter_completed(df):
        return df.filter(pl.col("status") == "completed")
    
    # Transform: enrich with customer info
    @dataset(name="enriched_orders", data_from=[filter_completed, customers])
    def enrich(orders_df, customers_df):
        return orders_df.join(
            customers_df, 
            left_on="customer", 
            right_on="customer_id"
        )
    
    # Publish these datasets
    yield completed_orders
    yield enriched_orders

Authoring Workflow

  1. Understand customer data — What does their raw data look like?
  2. Define sources — What columns/format do they upload?
  3. Write transformations — Use Polars to clean/transform
  4. Test locally — Use rowbase run to test
  5. Deploy — Use rowbase push to deploy to the platform
  6. Customer uses — Customer uploads files via web UI

Core Concepts

@pipeline

Decorator that marks a function as a pipeline. The function should be a generator that yields published datasets.

@pipeline
def my_pipeline():
    # ... sources and datasets ...
    yield published_dataset

@source

Declares an input data source. Returns a SourceHandle used as input to datasets.

orders = source(
    name="orders",
    columns=["order_id", "customer", "amount"],
    description="Raw orders from Shopify",
    reader_options={"separator": ",", "has_header": True},
    optional=False
)

Supported reader options:

  • sheet_name - Excel sheet name or index
  • skip_rows - Rows to skip before header
  • has_header - Whether file has header row
  • separator - CSV separator

@dataset

Declares a transformation function. The decorated function receives DataFrames and returns a DataFrame.

@dataset(
    name="cleaned_data",
    data_from=source_handle,
    schema=MyPydanticModel,
    on_schema_error="fail",
    description="Cleaned and validated data",
    metadata=True
)
def transform(df):
    return df.filter(pl.col("amount") > 0)

CLI Commands

rowbase --help

# Initialize a new pipeline project
rowbase init my-pipeline

# Run locally for testing
rowbase run

# Deploy pipeline to Rowbase
rowbase push

# List datasets
rowbase data list

Deployment

To deploy a pipeline:

rowbase push --api-key rb_xxx

This uploads your pipeline code to the Rowbase API, creating a new version that customers can use.

Customer Experience

Once deployed, customers see the pipeline in their dashboard:

  1. Select pipeline — Choose "Orders ETL" from the list
  2. Upload files — Upload orders.csv and customers.csv
  3. Submit — Click "Run"
  4. Wait — See progress (pending → running → completed)
  5. Download — Get enriched_orders.csv with clean data

Example: Data Cleaning Pipeline

@pipeline
def clean_customer_data():
    customers = source("customers")
    
    @dataset(name="valid_emails", data_from=customers)
    def filter_valid(df):
        # Remove rows with invalid emails
        return df.filter(pl.col("email").str.contains("@"))
    
    @dataset(name="normalized_phones", data_from=valid_emails)
    def normalize_phones(df):
        # Normalize phone numbers
        return df.with_columns(
            pl.col("phone").str.replace_all(r"[^0-9]", "").alias("phone")
        )
    
    yield valid_emails
    yield normalized_phones

Dependencies

  • polars - DataFrame operations
  • pydantic - Schema validation
  • typer - CLI framework
  • pyarrow - Parquet support
  • xlsxwriter - Excel support
  • fastexcel - Fast Excel parsing

License

Proprietary - All rights reserved

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rowbase-0.2.0.tar.gz (75.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rowbase-0.2.0-py3-none-any.whl (43.3 kB view details)

Uploaded Python 3

File details

Details for the file rowbase-0.2.0.tar.gz.

File metadata

  • Download URL: rowbase-0.2.0.tar.gz
  • Upload date:
  • Size: 75.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for rowbase-0.2.0.tar.gz
Algorithm Hash digest
SHA256 bade16706f72863c09281aff8d6c2bd51d3004882caf5dede3f9acf2a7a77a88
MD5 2671a30f5a03eb2bfccba7d3e5719264
BLAKE2b-256 043dd083185c0fe1dcd4f0a53e47d44bf368c7dbd75fe7c513cd1088209dd374

See more details on using hashes here.

Provenance

The following attestation bundles were made for rowbase-0.2.0.tar.gz:

Publisher: publish.yml on Rowbase-com/rowbase-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rowbase-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: rowbase-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 43.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for rowbase-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3bf7951e6870a0d18c2a78d6bb16a49af8a02d727b36f20e8be18954c0b9801e
MD5 5474f85247e8875fa4be7ff84014758f
BLAKE2b-256 fec05b00f7415192c28aa3ddd3601f37b4f9978aaf8d8d24cd706432d4013d87

See more details on using hashes here.

Provenance

The following attestation bundles were made for rowbase-0.2.0-py3-none-any.whl:

Publisher: publish.yml on Rowbase-com/rowbase-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page