Transformation/SQL and Python pipelinesData Engineer

How do I run SQL and Python transformations together on ClickHouse?

Define each step as a Bruin asset with YAML metadata on top of a .sql or .py file. Bruin resolves dependencies and runs them in order against ClickHouse, mixing SQL and Python in one pipeline.

Command

bruin run

Defined in

SQL + Python + YAML

Works with

ClickHouse + Bruin CLI

What you get

SQL and Python assetsdependency resolutionone runtime

How it works in code

-- orders.sql
/* @bruin
name: mart.orders
materialization:
  type: table
depends: [raw.orders]
@bruin */
SELECT id, amount, created_at FROM raw.orders

Run bruin run and Bruin runs each asset against ClickHouse in dependency order.

SQL and Python, one pipeline

Bruin CLI and ingestr are on GitHub.

A demo walks through your own data.

Sign up to our newsletter

Practical updates on open-source data pipelines, AI analysts, governance, and what we are shipping at Bruin.

The signup form is hosted by Brevo. Allow marketing cookies to load it.