prefect_dbt.core.runner
Runner for dbt commands
Functions
execute_dbt_node
- Set up the task logger
- Wait for the node to finish using efficient threading.Event
- Check the node’s status and fail if it’s in a failure state
Classes
PrefectDbtRunner
A runner for executing dbt commands with Prefect integration.
This class enables the invocation of dbt commands while integrating with Prefect’s
logging and assets capabilities.
Args:
manifest: Optional pre-loaded dbt manifestsettings: Optional PrefectDbtSettings instance for configuring dbtraise_on_failure: Whether to raise an error if the dbt command encounters a non-exception failureclient: Optional Prefect client instanceinclude_compiled_code: Whether to include compiled code in the asset descriptiondisable_assets: Global override for disabling asset generation for dbt nodes. If True, assets will not be created for any dbt nodes, even if the node’s prefect config has enable_assets set to True._force_nodes_as_tasks: Whether to force each dbt node execution to have a Prefect task representation when.invoke()is called outside of a flow or task run
get_dbt_event_msg
graph
invoke
dbtRunner.invoke(). https://docs.getdbt.com/reference/programmatic-invocations
Args:
args: List of command line arguments**kwargs: Additional keyword arguments
- The result of the dbt command invocation