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

[CT-2439] [Bug] dbt source freshness'output(_dir) not using target-path specified in dbt_project.yml #7411

Closed
2 tasks done
ChenyuLInx opened this issue Apr 19, 2023 · 2 comments · Fixed by #7412
Closed
2 tasks done
Assignees
Labels
bug Something isn't working

Comments

@ChenyuLInx
Copy link
Contributor

ChenyuLInx commented Apr 19, 2023

Is this a new bug in dbt-core?

  • I believe this is a new bug in dbt-core
  • I have searched the existing issues, and I could not find an existing issue for this bug

Current Behavior

dbt source freshness will write sources.json to default running dir instead of respecting the target-dir specified in dbt_project.yml.

Expected Behavior

When a target-path is specified in dbt_project.yml, dbt-core would write sources.json to that path.

Steps To Reproduce

Specify a target-path in dbt_project.yml that's different from default path. Run source freshness. You will see sources.json being written to the target dir in the current path not the path specified in dbt_project.yml

@ChenyuLInx ChenyuLInx added bug Something isn't working triage labels Apr 19, 2023
@ChenyuLInx ChenyuLInx self-assigned this Apr 19, 2023
@github-actions github-actions bot changed the title [Bug] dbt source freshness missing target-path param [CT-2439] [Bug] dbt source freshness missing target-path param Apr 19, 2023
@ChenyuLInx ChenyuLInx removed the triage label Apr 19, 2023
@ChenyuLInx ChenyuLInx changed the title [CT-2439] [Bug] dbt source freshness missing target-path param [CT-2439] [Bug] dbt source freshness not using target-path specified in dbt_project.yml Apr 19, 2023
@jtcohen6
Copy link
Contributor

Should --target-path graduate to being a top-level / "global" config? i.e.

$ dbt --target-path source freshness

@ChenyuLInx ChenyuLInx changed the title [CT-2439] [Bug] dbt source freshness not using target-path specified in dbt_project.yml [CT-2439] [Bug] dbt source freshness'output(_dir) not using target-path specified in dbt_project.yml Apr 21, 2023
@ChenyuLInx
Copy link
Contributor Author

@jtcohen6 Good question, I didn't touch --target-path in my change, all I did was to make sources.json write to target-path specified in dbt_project.yml.
source freshness doesn't support --target-path CLI arg since 1.4 at least. There's currently a community issue and PR regarding it. It is merged to main but TBD on whether this should be backported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants