Skip to content

Commit

Permalink
[CT-921] dbt compile works in click (#5545) (#6586)
Browse files Browse the repository at this point in the history
Co-authored-by: Github Build Bot <[email protected]>
resolves #5545
  • Loading branch information
aranke authored Jan 11, 2023
1 parent 91b20b7 commit 53127da
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 5 deletions.
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:/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:/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:/bitprophet/alabaster">Alabaster 0.7.12</a>

</div>
Expand Down

0 comments on commit 53127da

Please sign in to comment.