https://prefect.io logo
Title
g

Garren Moore

10/04/2022, 4:59 PM
Is
databricks
currently supported as a connection/profile type when using prefect-dbt cli commands (like
trigger_dbt_cli_command
?
RuntimeError: Command failed with exit code 1:
    Could not find adapter type databricks!
👀 1
1
a

Andrew Huang

10/04/2022, 5:36 PM
At the moment it’s not, but you can enter your info in the generic
TargetConfigs
see redshift for example: https://github.com/PrefectHQ/prefect-dbt/blob/main/prefect_dbt/cli/credentials.py#L61-L84
Also feel free to submit an issue for databricks to be added as a built-in target config
g

Garren Moore

10/04/2022, 7:07 PM
@Andrew Huang thanks - I will file the built-in target request The runtime error I posted
Could not find adapter type databricks!
was a result of the configuration using `TargetConfigs`:
DbtCliProfile(
    name="default",
    target="dev",
    target_configs=TargetConfigs(
        type="databricks",
        threads=2,
        schema="my_schema",
        extras={
            "host": f"<http://all-the-things.cloud.databricks.com|all-the-things.cloud.databricks.com>",
            "http_path": http_path,
            "token": token
        }
    )
)
a

Andrew Huang

10/04/2022, 7:53 PM
What’s your version of dbt?
g

Garren Moore

10/04/2022, 7:55 PM
latest …
Core:
  - installed: 1.2.2
a

Andrew Huang

10/04/2022, 8:13 PM
Seems like to use dbt databricks, you may need to pip install from https://docs.getdbt.com/reference/warehouse-profiles/databricks-profile
pip install dbt-databricks
Let me know if that works!
g

Garren Moore

10/04/2022, 8:30 PM
Yep, adding
dbt-databricks
to the install works … err … a different error
Thanks @Andrew Huang
a

Andrew Huang

10/04/2022, 8:32 PM
thanks for sharing! might add that to the readme about pip installing profiles