Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/testing #39

Merged
merged 18 commits into from
Jun 2, 2016
Merged

Feature/testing #39

merged 18 commits into from
Jun 2, 2016

Conversation

drewbanin
Copy link
Contributor

This is the first cut of testing -- views are created to ensure that

  1. model sql is valid
  2. all referenced tables exist
  3. all referenced columns in tables exist

Testings is pretty much just compilation + running sql w/ different CREATE templates and error handling. Lots of the changes below are tweaks to output, or refactoring to share code between compile, run, and test tasks

@jthandy
Copy link
Member

jthandy commented Jun 2, 2016

I set up dbt and everything appears to be in good order, but when I attempt to compile, I get this:

(venv)vagrant@precise64:/vagrant/zendesk$ dbt compile
Traceback (most recent call last):
  File "/usr/local/bin/dbt", line 7, in <module>
    execfile(__file__)
  File "/vagrant/scripts/dbt", line 8, in <module>
    dbt.main.main(sys.argv[1:])
  File "/vagrant/dbt/main.py", line 52, in main
    proj = project.read_project('dbt_project.yml').with_profiles(parsed.profile)
  File "/vagrant/dbt/project.py", line 115, in read_project
    proj.validate()
  File "/vagrant/dbt/project.py", line 81, in validate
    target_cfg = self.run_environment()
  File "/vagrant/dbt/project.py", line 66, in run_environment
    return self.cfg['outputs'][target_name]
KeyError: 'default'

I'm in a clean VM, set up dbt via python setup.py develop. I'm using the zendesk repo as an example, and compilation works perfectly fine in dbt master.

Not sure what's going on here but it's blocking me from testing out other elements of this PR...

@drewbanin
Copy link
Contributor Author

drewbanin commented Jun 2, 2016

@jthandy did you set up your ~/.dbt/profiles.yml file?

@jthandy
Copy link
Member

jthandy commented Jun 2, 2016

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants