dbt Tasks
prefect_dbt_flow.dbt.tasks
Code for generate prefect DAG, includes dbt run and test functions
generate_tasks_dag(project, profile, dag_options, dbt_graph, run_test_after_model=False)
Generate a Prefect DAG for running and testing dbt models.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
project |
DbtProject
|
A class that represents a dbt project configuration. |
required |
profile |
Optional[DbtProfile]
|
A class that represents a dbt profile configuration. |
required |
dag_options |
Optional[DbtDagOptions]
|
A class to add dbt DAG configurations. |
required |
dbt_graph |
List[DbtNode]
|
A list of dbt nodes (models) to include in the DAG. |
required |
run_test_after_model |
bool
|
If True, run tests after running each model. |
False
|
Returns:
Type | Description |
---|---|
None
|
None |
Source code in prefect_dbt_flow/dbt/tasks.py
212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 |
|