Skip to content

Commit

Permalink
dbt reader path bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Gouline committed Dec 13, 2019
1 parent 72c324e commit 5c66e46
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'metabase'
version: '0.1.2'
version: '0.1.3'

target-path: "target"
clean-targets: ["target", "dbt_modules"]
Expand Down
2 changes: 1 addition & 1 deletion dbtmetabase/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from .dbt import DbtReader
from .metabase import MetabaseClient

__version__ = '0.1.2'
__version__ = '0.1.3'

def export(dbt_path: str,
mb_host: str, mb_user: str, mb_password: str,
Expand Down
3 changes: 2 additions & 1 deletion dbtmetabase/dbt.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import yaml
import re
from pathlib import Path

class DbtReader:
"""Reader for dbt project configuration.
Expand All @@ -23,7 +24,7 @@ def read_models(self) -> list:

mb_models = []

for path in (self.project_path / 'models').rglob('*.yml'):
for path in (Path(self.project_path) / 'models').rglob('*.yml'):
with open(path, 'r') as stream:
schema = yaml.safe_load(stream)
for model in schema.get('models', []):
Expand Down

0 comments on commit 5c66e46

Please sign in to comment.