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
Path to the Squirrels project directory.
A copy of project variables as a dictionary.
A copy of environment variables as a dictionary.
A copy of the connections dictionary which maps connection keys to SQLAlchemy Engines or other objects.
The set of dependent data model names.
Methods
ref()
Returns the result of a dependent model as a polars LazyFrame.A polars LazyFrame of the dependent model’s result.
run_external_sql()
Runs a SQL query against an external database.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.A polars DataFrame of the query result