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-921] dbt compile works in click (#5545) #6586

Merged
merged 3 commits into from
Jan 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changes/unreleased/Under the Hood-20230111-145143.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Under the Hood
body: '[CT-921] dbt compile works in click'
time: 2023-01-11T14:51:43.324107-08:00
custom:
Author: aranke
Issue: "5545"
9 changes: 7 additions & 2 deletions core/dbt/cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from dbt.config.profile import Profile
from dbt.contracts.graph.manifest import Manifest
from dbt.task.clean import CleanTask
from dbt.task.compile import CompileTask
from dbt.task.deps import DepsTask
from dbt.task.run import RunTask
from dbt.task.test import TestTask
Expand Down Expand Up @@ -210,8 +211,12 @@ def docs_serve(ctx, **kwargs):
def compile(ctx, **kwargs):
"""Generates executable SQL from source, model, test, and analysis files. Compiled SQL files are written to the
target/ directory."""
click.echo(f"`{inspect.stack()[0][3]}` called\n flags: {ctx.obj['flags']}")
return None, True
config = RuntimeConfig.from_parts(ctx.obj["project"], ctx.obj["profile"], ctx.obj["flags"])
task = CompileTask(ctx.obj["flags"], config)

results = task.run()
success = task.interpret_results(results)
return results, success


# dbt debug
Expand Down
Binary file modified core/dbt/docs/build/doctrees/environment.pickle
Binary file not shown.
2 changes: 1 addition & 1 deletion core/dbt/docs/build/html/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ <h3 id="searchlabel">Quick search</h3>
&copy;2022, dbt Labs.

|
Powered by <a href="http://sphinx-doc.org/">Sphinx 6.1.2</a>
Powered by <a href="http://sphinx-doc.org/">Sphinx 6.1.3</a>
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>

</div>
Expand Down
2 changes: 1 addition & 1 deletion core/dbt/docs/build/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -826,7 +826,7 @@ <h3 id="searchlabel">Quick search</h3>
&copy;2022, dbt Labs.

|
Powered by <a href="http://sphinx-doc.org/">Sphinx 6.1.2</a>
Powered by <a href="http://sphinx-doc.org/">Sphinx 6.1.3</a>
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>

|
Expand Down
2 changes: 1 addition & 1 deletion core/dbt/docs/build/html/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ <h3>Related Topics</h3>
&copy;2022, dbt Labs.

|
Powered by <a href="http://sphinx-doc.org/">Sphinx 6.1.2</a>
Powered by <a href="http://sphinx-doc.org/">Sphinx 6.1.3</a>
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>

</div>
Expand Down