Skip to content

Commit

Permalink
build working with click
Browse files Browse the repository at this point in the history
  • Loading branch information
MichelleArk committed Jan 20, 2023
1 parent c85be32 commit dd307af
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions core/dbt/cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from dbt.task.test import TestTask
from dbt.task.snapshot import SnapshotTask
from dbt.task.list import ListTask
from dbt.task.build import BuildTask


# CLI invocation
Expand Down Expand Up @@ -101,6 +102,7 @@ def cli(ctx, **kwargs):
@p.profile
@p.profiles_dir
@p.project_dir
@p.resource_type
@p.select
@p.selector
@p.show
Expand All @@ -112,10 +114,16 @@ def cli(ctx, **kwargs):
@p.vars
@p.version_check
@requires.preflight
@requires.profile
@requires.project
def build(ctx, **kwargs):
"""Run all Seeds, Models, Snapshots, and tests in DAG order"""
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 = BuildTask(ctx.obj["flags"], config)

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


# dbt clean
Expand Down

0 comments on commit dd307af

Please sign in to comment.