Transformation/SQL and Python pipelinesData Engineer

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

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 Redshift, mixing SQL and Python in one pipeline.

Command

bruin run

Defined in

SQL + Python + YAML

Works with

Redshift + 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 Redshift in dependency order.

SQL and Python, one pipeline

Open source. Define assets, declare dependencies, run the graph with bruin run.

Sign up to our newsletter

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