Skip to content

Comments

Add directory change instruction after dbt init (Fixes #9041)#12232

Open
kalluripradeep wants to merge 4 commits intodbt-labs:mainfrom
kalluripradeep:fix-dbt-init-instruction
Open

Add directory change instruction after dbt init (Fixes #9041)#12232
kalluripradeep wants to merge 4 commits intodbt-labs:mainfrom
kalluripradeep:fix-dbt-init-instruction

Conversation

@kalluripradeep
Copy link
Contributor

What?

Adds a line to the dbt init output instructing users to change directories to their newly created project before running dbt debug.

Why?

Users were confused when dbt debug failed after running dbt init because they weren't in the project directory. This simple instruction helps prevent that confusion.

Fixes #9041

Changes

  • Modified ProjectCreated event message in core/dbt/events/types.py
  • Added: p.s. change directories to "{project_name}" to use this project

Example Output

After this change, when running dbt init, users will see:

Your new dbt project "my_project" was created!
For more information on how to configure the profiles.yml file,
please consult the dbt documentation here:
https://docs.getdbt.com/docs/configure-your-profile
One more thing:
Need help? Don't hesitate to reach out to us via GitHub issues or on Slack:
https://community.getdbt.com/
Happy modeling!
p.s. change directories to "my_project" to use this project

Testing

  • Tested locally by running dbt init and verifying the new message appears
  • Confirmed message format matches the acceptance criteria from the issue

Checklist

  • I have read the contributing guide
  • I have signed the CLA
  • I have added a changelog entry
  • This PR includes only the dbt init instruction change

@kalluripradeep kalluripradeep requested a review from a team as a code owner November 28, 2025 21:15
@cla-bot cla-bot bot added the cla:yes label Nov 28, 2025
@github-actions github-actions bot added the community This PR is from a community member label Nov 28, 2025
@sriramr98 sriramr98 assigned sriramr98 and unassigned sriramr98 Feb 18, 2026
Copy link
Contributor

@sriramr98 sriramr98 left a comment

Choose a reason for hiding this comment

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

Hi @kalluripradeep

Thanks for the PR. There's one small fix that needs attention.
Please fix it and rebase with upstream main.

Fixes dbt-labs#9041 - Adds a line instructing users to cd into the newly created project directory
@kalluripradeep kalluripradeep force-pushed the fix-dbt-init-instruction branch 2 times, most recently from e72b76d to 8e0a0c7 Compare February 21, 2026 17:57
@kalluripradeep kalluripradeep force-pushed the fix-dbt-init-instruction branch from 8e0a0c7 to 4b15f1c Compare February 21, 2026 18:03
@kalluripradeep
Copy link
Contributor Author

Rebased with upstream main and addressed both review comments — updated the message to show the absolute project path, and removed the stray p.s. line. Let me know if anything else needs attention

@codecov
Copy link

codecov bot commented Feb 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.44%. Comparing base (019ebdc) to head (a6c99e3).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12232      +/-   ##
==========================================
- Coverage   91.45%   91.44%   -0.01%     
==========================================
  Files         203      203              
  Lines       25471    25472       +1     
==========================================
- Hits        23294    23293       -1     
- Misses       2177     2179       +2     
Flag Coverage Δ
integration 88.30% <100.00%> (-0.04%) ⬇️
unit 65.47% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
Unit Tests 65.47% <100.00%> (+<0.01%) ⬆️
Integration Tests 88.30% <100.00%> (-0.04%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sriramr98 sriramr98 self-assigned this Feb 23, 2026
@sriramr98
Copy link
Contributor

@kalluripradeep You might need to run pre-commit run --all-files to fix the issues with ** black**

@kalluripradeep
Copy link
Contributor Author

@kalluripradeep You might need to run pre-commit run --all-files to fix the issues with ** black**

Thank you @sriramr98 , have made the changes can you please have a look

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.

[CT-3363] [Feature] interactive dbt init flow's instructions don't results in a successful dbt debug, because you need to enter the new subdirectory

3 participants