bauplan.helpers module

The Bauplan module does not come with pandas, but it can be used with pandas workflows if pandas is installed.

This module provides a few utility functions that can be used to run SQL queries against a Bauplan instance, and to visualize the results in a Python notebook through a magic cell syntax.

bauplan.helpers.bauplan_sql(line: int, cell: str) DataFrame

This function is a magic cell that allows users to run SQL queries on Bauplan directly in a Python notebook cell - optionally, the branch can be specified next to the magic command, e.g.:

%%bauplan_sql main

SELECT c1 FROM t2 WHERE f=1

The result of the query will be returned as a pandas DataFrame object, which gets nicely visualized in a Python notebook by default.

This function is not intended to be called directly, but rather used as a magic cell.

If you do not have pandas installed, this raises bauplan.exceptions.MissingPandasError.