Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DBT Tasks extra_command_args Fix #13308

Merged
merged 8 commits into from
May 14, 2024
Merged

DBT Tasks extra_command_args Fix #13308

merged 8 commits into from
May 14, 2024

Conversation

robfreedy
Copy link
Contributor

This PR modifies the DBT pre built task methods to accept a list of extra command args in order to solve a bug with the dbtRunner client.

Example

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

@flow
def dbt_flow():
    run_dbt_model(
        project_dir="/Users/rob.freedy/Documents/prefect/internal-prefect/prefect-dbt-examples/prefect_dbt_bigquery",
        extra_command_args=['--models', 'foo_model']
    )

Checklist

  • This pull request references any related issue by including "closes <link to issue>"
    • If no issue exists and your change is not a small fix, please create an issue first.
  • If this pull request adds new functionality, it includes unit tests that cover the changes
  • This pull request includes a label categorizing the change e.g. maintenance, fix, feature, enhancement, docs.

For documentation changes:

  • This pull request includes redirect settings in netlify.toml for files that are removed or renamed.

For new functions or classes in the Python SDK:

  • This pull request includes helpful docstrings.
  • If a new Python file was added, this pull request contains a stub page in the Python SDK docs and an entry in mkdocs.yml navigation.

@robfreedy robfreedy changed the title DBT Tasks Fix DBT Tasks extra_command_args Fix May 13, 2024
Copy link

netlify bot commented May 13, 2024

Deploy Preview for prefect-docs-preview ready!

Name Link
🔨 Latest commit 9907fa3
🔍 Latest deploy log https://app.netlify.com/sites/prefect-docs-preview/deploys/6643648a04e740000892d78e
😎 Deploy Preview https://deploy-preview-13308--prefect-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@robfreedy robfreedy added the fix A fix for a bug in an existing feature label May 13, 2024
@desertaxle desertaxle added the integrations Related to integrations with other services label May 14, 2024
@robfreedy robfreedy requested a review from desertaxle May 14, 2024 20:24
@robfreedy robfreedy merged commit 5809dd3 into main May 14, 2024
13 checks passed
@robfreedy robfreedy deleted the bug/dbt-task-fix branch May 14, 2024 21:44
@@ -31,7 +31,7 @@ async def trigger_dbt_cli_command(
dbt_cli_profile: Optional[DbtCliProfile] = None,
create_artifact: bool = True,
artifact_key: str = "dbt-cli-command-summary",
**command_kwargs: Dict[str, Any],
extra_command_args: List[str] = None,
Copy link
Contributor

Choose a reason for hiding this comment

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

here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix A fix for a bug in an existing feature integrations Related to integrations with other services
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants