Exemple #1
0
def handle(args):
    parsed = parse_args(args)

    # this needs to happen after args are parsed so we can determine the
    # correct profiles.yml file
    if not config.send_anonymous_usage_stats(parsed.profiles_dir):
        dbt.tracking.do_not_track()

    res = run_from_args(parsed)
    dbt.tracking.flush()

    return res
Exemple #2
0
def handle(args):
    parsed = parse_args(args)

    # this needs to happen after args are parsed so we can determine the
    # correct profiles.yml file
    profile_config = config.read_config(parsed.profiles_dir)
    if not config.send_anonymous_usage_stats(profile_config):
        dbt.tracking.do_not_track()
    else:
        dbt.tracking.initialize_tracking()

    if dbt.config.colorize_output(profile_config):
        dbt.ui.printer.use_colors()

    res = run_from_args(parsed)
    dbt.tracking.flush()

    return res
Exemple #3
0
def handle_and_check(args):
    parsed = parse_args(args)
    # this needs to happen after args are parsed so we can determine the
    # correct profiles.yml file
    profile_config = read_config(parsed.profiles_dir)
    if not send_anonymous_usage_stats(profile_config):
        dbt.tracking.do_not_track()
    else:
        dbt.tracking.initialize_tracking()

    if colorize_output(profile_config):
        dbt.ui.printer.use_colors()

    try:
        task, res = run_from_args(parsed)
    finally:
        dbt.tracking.flush()

    success = task.interpret_results(res)

    return res, success