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-3015] [Bug] DBT ls command doesn't accept log-path option #8462

Closed
2 tasks done
DanMawdsleyBA opened this issue Aug 20, 2023 · 1 comment
Closed
2 tasks done

[CT-3015] [Bug] DBT ls command doesn't accept log-path option #8462

DanMawdsleyBA opened this issue Aug 20, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@DanMawdsleyBA
Copy link

DanMawdsleyBA commented Aug 20, 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

This links to astronomer/astronomer-cosmos#411 which are fixing a permissions issues where in airflow having read only permissions. To get around this they have implemented a fix to write target and logs to a temporary directory however the dbt ls command does not accept either the log-path flag or equivalent environment variable.

Expected Behavior

Allow dbt ls command to use the flag --log-path or DBT_LOG_PATH environment variable to set a log path.

Steps To Reproduce

Run the below command:
dbt ls --log-path path/to/logs

Relevant log output

dbt ls --log-path value
Usage: dbt ls [OPTIONS]
Try 'dbt ls -h' for help.

Error: No such option: --log-path Did you mean --target-path?

Environment

- OS: Windows 10
- Python: 3.10
- dbt: 1.5.5

Which database adapter are you using with dbt?

snowflake

Additional Context

Links to astronomer/astronomer-cosmos#411 and may be a blocker to their fix

@DanMawdsleyBA DanMawdsleyBA added bug Something isn't working triage labels Aug 20, 2023
@github-actions github-actions bot changed the title [Bug] DBT ls command doesn't accept log-path option [CT-3015] [Bug] DBT ls command doesn't accept log-path option Aug 20, 2023
@jtcohen6
Copy link
Contributor

@DanMawdsleyBA Try putting --log-path before the subcommand:

dbt --log-path path/to/logs ls

This is because --log-path is a "global" flag, registered on the dbt namespace, rather than each individual subcommand (docs).

I agree this is confusing and hard to remember, hence my motivation for supporting these flags in both places:

In the meantime, I'm going to close this specific issue as resolved

@jtcohen6 jtcohen6 removed the triage label Aug 21, 2023
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

No branches or pull requests

2 participants