Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

SegmentStream pipeline SDK

segmentstream-pipeline is the small runtime contract between a workspace's Dagster definitions and the warehouse provisioned by SegmentStream. Dagster continues to own assets and jobs, while Ibis continues to own relational expressions. This package supplies lazy runtime configuration and durable warehouse I/O.

The initial connector supports BigQuery, automatic dataset creation, and full-table replacement. It reads the following non-secret configuration when a pipeline first accesses the warehouse:

  • SEGMENTSTREAM_WAREHOUSE_ENGINE
  • SEGMENTSTREAM_WAREHOUSE_CATALOG
  • SEGMENTSTREAM_WAREHOUSE_DEFAULT_NAMESPACE
  • SEGMENTSTREAM_WAREHOUSE_LOCATION (optional)

Configuration and authentication are deliberately lazy. Importing and validating definitions.py during a deployment build does not connect to a warehouse. In Cloud Run, the BigQuery connector uses the attached workload identity through Application Default Credentials.

import dagster as dg
import ibis
import ibis.expr.types as ir

from segmentstream import WAREHOUSE_IO_MANAGER_KEY, warehouse_resources


BRONZE_ORDERS = dg.AssetKey(["bronze", "orders"])
SILVER_ORDERS = dg.AssetKey(["silver", "orders"])


@dg.asset(
    key=BRONZE_ORDERS,
    io_manager_key=WAREHOUSE_IO_MANAGER_KEY,
    kinds={"ibis"},
)
def orders() -> ir.Table:
    return ibis.memtable(
        [{"order_id": "o-1", "amount": 100.0}],
        schema={"order_id": "string", "amount": "float64"},
    )


@dg.asset(
    key=SILVER_ORDERS,
    ins={"orders": dg.AssetIn(key=BRONZE_ORDERS)},
    io_manager_key=WAREHOUSE_IO_MANAGER_KEY,
    kinds={"ibis"},
)
def normalized_orders(orders: ir.Table) -> ir.Table:
    return orders.filter(orders.amount > 0)


defs = dg.Definitions(
    assets=[orders, normalized_orders],
    resources=warehouse_resources(),
)

Asset keys map to relations using a small convention:

  • ["orders"] uses the configured default namespace.
  • ["bronze", "orders"] uses the explicit bronze dataset.
  • Other key shapes are rejected.

The workspace project is always supplied by SegmentStream and cannot be overridden by an asset. Before writing an asset, the IO manager creates its validated dataset with CREATE SCHEMA IF NOT EXISTS in the configured location. This lets pipeline authors organize one workspace project into datasets such as bronze, silver, and gold without provisioning them separately.

For local package development, install this project in editable mode rather than adding a relative path dependency to a deployable pipeline.

Published workspace pipelines will install the provider extra:

python -m pip install "segmentstream-pipeline[bigquery]"

Releases

Releases use the version declared in pyproject.toml and are published from the pipeline-sdk-v<version> Git tag by the protected pipeline-sdk-release.yml workflow. The workflow builds the wheel and source distribution in a job without publishing credentials, then uses PyPI Trusted Publishing from the pypi GitHub environment. No long-lived PyPI token is stored in GitHub.

PyPI releases are immutable. Increment the package version before creating a new release tag; do not reuse a version that has already been uploaded.

Download files

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

Source Distribution

segmentstream_pipeline-0.1.0a2.tar.gz (77.5 kB view details)

Uploaded Source

Built Distribution

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

segmentstream_pipeline-0.1.0a2-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

Details for the file segmentstream_pipeline-0.1.0a2.tar.gz.

File metadata

  • Download URL: segmentstream_pipeline-0.1.0a2.tar.gz
  • Upload date:
  • Size: 77.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for segmentstream_pipeline-0.1.0a2.tar.gz
Algorithm Hash digest
SHA256 9172ef2043d1206e6982288ed312cb6c62fe541c275be320e9a95ca9e7892d0a
MD5 dd3e9890d765a2cf80ef146091301ca8
BLAKE2b-256 52ac4f6aca6d1e3b10ba49a2ee2d6b9a9700e0a4976f580f862c1faf33926090

See more details on using hashes here.

Provenance

The following attestation bundles were made for segmentstream_pipeline-0.1.0a2.tar.gz:

Publisher: pipeline-sdk-release.yml on segmentstream/segmentstream

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

File details

Details for the file segmentstream_pipeline-0.1.0a2-py3-none-any.whl.

File metadata

File hashes

Hashes for segmentstream_pipeline-0.1.0a2-py3-none-any.whl
Algorithm Hash digest
SHA256 abe079b269632dbb02b431cd264c92940c7f39095c9789608769a67415f172d8
MD5 6a7acb09f3aae69686311827d024fd52
BLAKE2b-256 262bf6e671e7bef6a88e566d69bee029f0d65ef6412cb4f3734a071febed185e

See more details on using hashes here.

Provenance

The following attestation bundles were made for segmentstream_pipeline-0.1.0a2-py3-none-any.whl:

Publisher: pipeline-sdk-release.yml on segmentstream/segmentstream

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page