Skip to main content
BuildModelArgs is the class type of the sqrl argument for the main function of “build models” (i.e. data models in the models/builds/ folder), which runs at build time. The class can be imported from the squirrels.arguments or squirrels module.

Properties

str
Path to the Squirrels project directory.
dict[str, Any]
A copy of project variables as a dictionary.
dict[str, str]
A copy of environment variables as a dictionary.
dict[str, Any]
A copy of the connections dictionary which maps connection keys to SQLAlchemy Engines or other objects.
set[str]
The set of dependent data model names.

Methods

ref()

Returns the result of a dependent model as a polars LazyFrame.
polars.LazyFrame
A polars LazyFrame of the dependent model’s result.

run_external_sql()

Runs a SQL query against an external database.
polars.DataFrame
A polars DataFrame of the query result.

run_sql_on_dataframes()

Uses a dictionary of dataframes to execute a SQL query in an embedded DuckDB database.
polars.DataFrame
A polars DataFrame of the query result