PrefectHQ / prefect-dbt

Collection of Prefect integrations for working with dbt with your Prefect flows.

Home Page:https://prefecthq.github.io/prefect-dbt/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Execute a dbt CLI command

KayJey-Krayen opened this issue · comments

Running the given sample code for 'Execute a dbt CLI command' in docs

from prefect import flow
from prefect_dbt.cli.commands import trigger_dbt_cli_command

@flow
def trigger_dbt_cli_command_flow() -> str:
    result = trigger_dbt_cli_command("dbt debug")
    return result # Returns the last line the in CLI output

trigger_dbt_cli_command_flow()

Results in the error


esponse: {'exception_message': 'Internal Server Error'}
For more information check: https://httpstatuses.com/500
Worker information:
    Approximate queue length: 0
    Pending log batch length: 6
    Pending log batch size: 2160
The log worker will attempt to send these logs again in 2.0s

the models runs fine from CLI , running it from prefect-dbt results in the error

I am unable to reproduce; is the 500 error coming from dbt or Prefect?

Closing this, but feel free to re-open if this is still an issue.