Edit official run dbt in production docs
sungchun12 opened this issue · comments
https://docs.getdbt.com/docs/running-a-dbt-project/running-dbt-in-production/#using-prefect
Replace the above link with nice screenshot examples and reference code example hyperlinks
Keep in mind you'll likely ADD onto the existing docs as this integration is for prefect 2.0 orion. Prefect 1.0 run in production docs are still relevant for 1.0 purposes.
To be assigned to Bela
Hi, we were wondering if there's anything we can do to help add prefect-dbt to the docs?
@belasobral93 can you give input here?
@ahuang11 Hi there, can you validate for accuracy? (The formatting needs to be cleaned up, but I will ask our Docs team for their guidelines). Additionally I also am looking for a higher res version of the dag (image below) - can you help me find a copy?
Prefect
If your organization is using Prefect, the way you will run your jobs depends on the version you are on, and whether you are orchestrating dbt cloud or core jobs. A variety of options are described below.
- If you are using Prefect 2.0
-
Invoking dbt cloud jobs
- Use the [trigger_dbt_cloud_job_run_and_wait_for_completion task](https://prefecthq.github.io/prefect-dbt/#trigger-a-dbt-cloud-job-and-wait-for-completion. As jobs are executing, you can poll dbt to see whether or not the job completes without failures, through the prefect UI.
-
Invoking dbt through the cli
- Use the trigger_dbt_cli_command task
For details on both of these methods, see prefect-dbt docs.
- If you are using Prefect 1.0
- Invoking dbt cloud jobs
- Trigger dbt Cloud jobs with the DbtCloudRunJob task. Running this task will generate a markdown artifact viewable in the Prefect UI. The artifact will contain links to the dbt artifacts generate as a result of the job run. - Invoking dbt through the cli
- Use the DbtShellTask to schedule, execute and monitor your dbt runs.
- Use the supported ShellTask to execute dbt commands through the shell.
@ahuang11 wanted to make sure you saw my ask ^
Thanks for the reminder! Also cc @desertaxle
I fixed some hyperlinks and cleaned up the formatting a bit. Also maybe you can use this image?
https://user-images.githubusercontent.com/12350579/186269036-01f1090f-1887-433d-8331-ee7c8b315dd5.png
I think our marketing team may also want to comment on how we want to publish this.
Prefect
If your organization is using Prefect, the way you will run your jobs depends on the version you are on, and whether you are orchestrating dbt Cloud or core jobs. A variety of options are described below.
On Prefect 2
dbt Cloud
Use the trigger_dbt_cloud_job_run_and_wait_for_completion flow. As jobs are executing, you can poll dbt to see whether or not the job completes without failures, through the prefect UI.
dbt Core
Use the trigger_dbt_cli_command task.
For details on both of these methods, see prefect-dbt docs.
On Prefect 1
dbt Cloud
Trigger dbt Cloud jobs with the DbtCloudRunJob task. Running this task will generate a markdown artifact viewable in the Prefect UI. The artifact will contain links to the dbt artifacts generate as a result of the job run.
dbt Core
Use the DbtShellTask to schedule, execute and monitor your dbt runs. Use the supported ShellTask to execute dbt commands through the shell.
@ahuang11 thank you! If you want to give the language and images a run by your marketing team, let me know and I can get the approval from our docs/partnership team. If not, I'll go ahead and submit this draft tomorrow.
@belasobral93 thanks; I think it can be submitted as a draft! Curious if dbt team is open to updating this in the future (like in 3-6 months) as we rebrand off the migration period (deprecating Prefect 1 and updating Prefect 2 to simply Prefect)?
Thank you!