Skip to content

Sql

This module contains the base class for SQL steps.

koheesio.models.sql.SqlBaseStep #

Base class for SQL steps

params are used as placeholders for templating. These are identified with ${placeholder} in the SQL script.

Parameters:

Name Type Description Default
sql_path

Path to a SQL file

required
sql

SQL script to apply

required
params

Placeholders (parameters) for templating. These are identified with ${placeholder} in the SQL script.

Note: any arbitrary kwargs passed to the class will be added to params.

required

params class-attribute instance-attribute #

params: Dict[str, Any] = Field(default_factory=dict, description='Placeholders (parameters) for templating. These are identified with ${placeholder} in the SQL script. Note: any arbitrary kwargs passed to the class will be added to params.')

query property #

query

Returns the query while performing params replacement

sql class-attribute instance-attribute #

sql: Optional[str] = Field(default=None, description='SQL script to apply')

sql_path class-attribute instance-attribute #

sql_path: Optional[Union[Path, str]] = Field(default=None, description='Path to a SQL file')