question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add argument to dbt clean for logs

See original GitHub issue

Describe the feature

What are the circumstances in which someone runs dbt clean? Usually when troubleshooting or trying to understand what is going on that doesn’t look right. When troubleshooting you often want to see your logs to match what you’re looking for. You might look at logs, then run clean, then want run the thing, then look at your logs again. If you forgot to clear or cycle your logs, though, now you might have to dig to find the info you’re looking for.

My proposal: add an argument to dbt clean that also wipes your logs, e.g. dbt clean --include logs or something similar.

Describe alternatives you’ve considered

This tip from @clrcrl on cycling logs is what I use: https://discourse.getdbt.com/t/tips-and-tricks-about-working-with-dbt/287/4 but sometimes I forget to run it.

Additional context

Is this feature database-specific? Which database(s) is/are relevant? Please include any other relevant context here.

I don’t think so.

Who will this benefit?

What kind of use case will this feature be useful for? Please be specific and provide examples, this will help us prioritize properly.

Anyone who is troubleshooting dbt models.

Are you interested in contributing this feature?

Let us know if you want to write some code, and how we can help.

👶 🍼 in theory yes, but unlikely

I guess my first question would be: is this something that other people think would be useful in dbt?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
emilieschariocommented, Oct 27, 2021

oh, interesting. That could work too. Do you see more demand for this?

On Mon, Oct 25, 2021 at 7:41 AM, Jeremy Cohen @.***> wrote:

@emilieschario https://github.com/emilieschario I like the idea of an optional flag to dbt clean that cycles the files instead! Perhaps –cycle-path?

This could be useful for things like --state, too.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/dbt-labs/dbt-core/issues/2993#issuecomment-950836356, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADLH5Q6JL755G3K3SVU6H7DUIU675ANCNFSM4VWU5GKQ .

1reaction
emilieschariocommented, Oct 25, 2021

oh, thanks stale bot for resurfacing this on my radar.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Add argument to dbt clean for logs · Issue #2993 - GitHub
My proposal: add an argument to dbt clean that also wipes your logs, e.g. dbt clean --include logs or something similar.
Read more >
clean-targets - dbt Developer Hub
Remove packages and compiled files as part of dbt clean ​ ... Remove logs when running dbt clean ​. dbt_project.yml. clean-targets: [target ...
Read more >
Debugging errors - dbt Developer Hub
If you're hitting a strange Database Error , it can be a good idea to clean out your logs by opening the file,...
Read more >
Cleaning up removed models from your production schema ...
Option 1: Periodically drop and rebuild the entire schema. dbt is built on the assumption that everything can be rebuilt at any given...
Read more >
run | dbt Developer Hub
dbt run executes compiled sql model files against the current target database. dbt connects to the target database and runs the relevant SQL ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found