Using the Bruin Python SDK
Skip the boilerplate. Use the Bruin Python SDK to query databases, manage connections, and access pipeline context from your Python assets with a few imports.
What
Goal - Learn how to use the Bruin Python SDK to eliminate boilerplate in your Python assets. Query databases, access typed connections, and read pipeline context with just a few imports.
Audience - Data engineers and analysts writing Python assets in Bruin who want cleaner, more maintainable pipeline code.
Prerequisites
- Bruin CLI installed
- A Bruin project with at least one Python asset
- Python 3.10 or higher
- A configured database connection (BigQuery, Postgres, Snowflake, DuckDB, etc.)
More guides
Capstone: add returns to the pipeline
Extend the project, prove the result, and assess the finished pipeline.
Describe the model in its asset definition
Keep the metric definition, owners, limits, and checked examples next to the SQL.
Load and profile the source data
Load local commerce data and check its shape before modeling it.