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

How to declare a DbtCliProfile Block

lucienfregosibodyguard opened this issue Β· comments

Hi πŸ‘‹

I'm trying to use a DbtCliProfile block instead of defining everything in the code.
The thing is I don't know how to register it in prefect block library.

I tried to use the JSON block but got an error when loading the block.

dbt_cli_profile = DbtCliProfile.load("BLOCK_NAME").get_profile()

Do you have any inputs/docs on that specific point ?

Thanks

Run In the terminal:
prefect block register -m prefect_dbt.cli.credentials

This should make it show up on the UI. From https://orion-docs.prefect.io/concepts/blocks/#registering-blocks-for-use-in-prefect-cloud

It seems specific to prefect Cloud and I'm using the open source version, helm deployed version.

I did manage to register the block through a bit of python code