Skip to content

Conversation

@igor-dabrowski-affirm
Copy link

@igor-dabrowski-affirm igor-dabrowski-affirm commented Oct 24, 2025

  • Introduce --project-id flag to override dbt Cloud project ID
  • Update main.py to include project_id decorator
  • Modify requires.py to set project ID in dbt_cloud if provided

Resolves #12113
I could not properly test it - it is my first open-source commit. Would appreciate the check or guidance how I can do it as I was getting errors trying to set up testing env following the docs.

Problem

Hardcoded dbt-cloud project-id number in the dbt_project.yml making it very difficult to run the same repo against different dbt cloud projects.

Solution

This PR solves the issue by adding the --project-id flag and enable teams to use it to run dbt project against different cloud projects via cli.

Checklist

  • I have read the contributing guide and understand what's expected of me.
  • I have run this code in development, and it appears to resolve the stated issue.
  • This PR includes tests, or tests are not required or relevant for this PR.
  • This PR has no interface changes (e.g., macros, CLI, logs, JSON artifacts, config files, adapter interface, etc.) or this PR has already received feedback and approval from Product or DX.
  • This PR includes type annotations for new and modified functions.

* Introduce --project-id flag to override dbt Cloud project ID
* Update main.py to include project_id decorator
* Modify requires.py to set project ID in dbt_cloud if provided
@igor-dabrowski-affirm igor-dabrowski-affirm requested a review from a team as a code owner October 24, 2025 09:13
@cla-bot
Copy link

cla-bot bot commented Oct 24, 2025

Thanks for your pull request, and welcome to our community! We require contributors to sign our Contributor License Agreement and we don't seem to have your signature on file. Check out this article for more information on why we have a CLA.

In order for us to review and merge your code, please submit the Individual Contributor License Agreement form attached above above. If you have questions about the CLA, or if you believe you've received this message in error, please reach out through a comment on this PR.

CLA has not been signed by users: @igor-dabrowski-affirm

@github-actions
Copy link
Contributor

Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the contributing guide.

@github-actions github-actions bot added the community This PR is from a community member label Oct 24, 2025
@cla-bot
Copy link

cla-bot bot commented Oct 24, 2025

Thanks for your pull request, and welcome to our community! We require contributors to sign our Contributor License Agreement and we don't seem to have your signature on file. Check out this article for more information on why we have a CLA.

In order for us to review and merge your code, please submit the Individual Contributor License Agreement form attached above above. If you have questions about the CLA, or if you believe you've received this message in error, please reach out through a comment on this PR.

CLA has not been signed by users: @igor-dabrowski-affirm

* Implement tests to verify parsing, optionality, and default behavior of the --project-id flag.
* Ensure the flag is accessible across various commands and can be set via environment variables.
* Confirm that CLI flag takes precedence over environment variable settings.
@cla-bot cla-bot bot added the cla:yes label Oct 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla:yes community This PR is from a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Add --project-id flag as a global flag

1 participant