Skip to content

Commit

Permalink
fix case on dbt references (#317)
Browse files Browse the repository at this point in the history
## Description

In this PR dbt is updated to consistently be all lower-case except in
functionally required places for it to be capitalized in some way.

## Related Issue(s)
closes #306 

## Breaking Change?

No

## Checklist

- [x] I have made corresponding changes to the documentation (if
required)
- [x] I have added tests that prove my fix is effective or that my
feature works
  • Loading branch information
Spince authored Jun 7, 2023
1 parent f6b0e71 commit d884f58
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions cosmos/providers/dbt/core/utils/warn_parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

def parse_output(result: SubprocessResult, keyword: str) -> int:
"""
Parses the DBT test output message and returns the number of errors or warnings.
Parses the dbt test output message and returns the number of errors or warnings.
:param result: String containing the output to be parsed.
:param keyword: String representing the keyword to search for in the output (WARN, ERROR).
Expand Down Expand Up @@ -35,10 +35,10 @@ def extract_log_issues(log_list: List[str]) -> Tuple[List[str], List[str]]:
"""
Extracts warning messages from the log list and returns them as a formatted string.
This function searches for warning messages in DBT test. It reverses the log list for performance
This function searches for warning messages in dbt test. It reverses the log list for performance
improvement. It extracts and formats the relevant information and appends it to a list of warnings.
:param log_list: List of strings, where each string is a log line from DBT test.
:param log_list: List of strings, where each string is a log line from dbt test.
:return: two lists of strings, the first one containing the test names and the second one
containing the test results.
"""
Expand Down
2 changes: 1 addition & 1 deletion cosmos/providers/dbt/parser/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

class DbtModelType(Enum):
"""
Represents type of DBT unit (model, snapshot, seed)
Represents type of dbt unit (model, snapshot, seed)
"""

DBT_MODEL = 1
Expand Down
2 changes: 1 addition & 1 deletion cosmos/providers/dbt/render.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def render_project(
)
else:
# TODO: coverme
logger.error("Unknown DBT type.")
logger.error("Unknown dbt type.")
continue

# if test_behavior isn't "after_each", we can just add the task to the
Expand Down
2 changes: 1 addition & 1 deletion docs/dbt/execution-modes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ In this case, users are responsible for declaring which version of ``dbt`` they
Similar to the ``local`` execution mode, Cosmos converts Airflow Connections into a way ``dbt`` understands them by creating
a ``dbt`` profile file (``profiles.yml``).

A drawback with this approach is that it is slower than ``local`` because it creates a new Python virtual environment for each Cosmos Dbt task run.
A drawback with this approach is that it is slower than ``local`` because it creates a new Python virtual environment for each Cosmos dbt task run.

Example of how to use:

Expand Down

0 comments on commit d884f58

Please sign in to comment.