Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Add dbt Cloud Job block #101

Merged
merged 21 commits into from
Feb 10, 2023
Merged

Add dbt Cloud Job block #101

merged 21 commits into from
Feb 10, 2023

Conversation

ahuang11
Copy link
Contributor

@ahuang11 ahuang11 commented Dec 7, 2022

A concrete implementation of JobBlock introduced here.

Closes #97

Example


from prefect import flow
from prefect_dbt.cloud import DbtCloudCredentials, DbtCloudJob

@flow
def test_flow():
    dbt_cloud_credentials = DbtCloudCredentials.load("dbt-token")
    job = DbtCloudJob(credentials=dbt_cloud_credentials, job_id=154217)
    run = job.trigger()
    run.wait_for_completion()
    run.fetch_results()
    return run

run = test_flow()

Screenshots

image

Checklist

  • References any related issue by including "Closes #" or "Closes ".
    • If no issue exists and your change is not a small fix, please create an issue first.
  • Includes tests or only affects documentation.
  • Passes pre-commit checks.
    • Run pre-commit install && pre-commit run --all locally for formatting and linting.
  • Includes screenshots of documentation updates.
    • Run mkdocs serve view documentation locally.
  • Summarizes PR's changes in CHANGELOG.md

Copy link
Member

@desertaxle desertaxle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a couple of thoughts that I had when looking at this implementation.

@ahuang11 ahuang11 marked this pull request as ready for review February 2, 2023 03:07
@ahuang11 ahuang11 requested a review from a team February 2, 2023 03:07
@ahuang11 ahuang11 changed the title Add job block Add dbt Cloud Job block Feb 2, 2023
Copy link
Member

@desertaxle desertaxle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good overall! Just a couple of questions around deprecation and naming.

@ahuang11 ahuang11 requested a review from desertaxle February 10, 2023 20:40
@ahuang11 ahuang11 merged commit f8c17cf into main Feb 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Show polling status updates selectively by comparing previous status vs current status
3 participants