Skip to content

Commit

Permalink
snowflake in windows (dbt-labs#276)
Browse files Browse the repository at this point in the history
  • Loading branch information
cmcarthur authored Feb 7, 2017
1 parent c1f3f0f commit ce5f2f4
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 15 deletions.
5 changes: 3 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ environment:
TOX_ENV: "pywin"

matrix:
- PYTHON: "C:\\Python27"
PYTHON_VERSION: "2.7.8"
- PYTHON: "C:\\Python35"
PYTHON_VERSION: "3.5.2"
PYTHON_ARCH: "32"

#- PYTHON: "C:\\Python35"
Expand Down Expand Up @@ -51,6 +51,7 @@ install:
build: false # Not a C# project, build stuff at the test step instead.

before_test:
- "%CMD_IN_ENV% pip install psycopg2==2.6.2"
- "%CMD_IN_ENV% pip install tox"

test_script:
Expand Down
11 changes: 1 addition & 10 deletions dbt/adapters/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,12 @@

from dbt.adapters.postgres import PostgresAdapter
from dbt.adapters.redshift import RedshiftAdapter

if platform.system() != 'Windows':
from dbt.adapters.snowflake import SnowflakeAdapter
else:
SnowflakeAdapter = None
from dbt.adapters.snowflake import SnowflakeAdapter


def get_adapter(profile):
adapter_type = profile.get('type', None)

if platform.system() == 'Windows' and \
adapter_type == 'snowflake':
raise dbt.exceptions.NotImplementedException(
"ERROR: 'snowflake' is not supported on Windows.")

adapters = {
'postgres': PostgresAdapter,
'redshift': RedshiftAdapter,
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
argparse>=1.2.1
Jinja2>=2.8
PyYAML>=3.11
psycopg2==2.6.1
psycopg2==2.6.2
sqlparse==0.1.19
networkx==1.11
csvkit==0.9.1
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
install_requires=[
'Jinja2>=2.8',
'PyYAML>=3.11',
'psycopg2==2.6.1',
'psycopg2==2.6.2',
'sqlparse==0.1.19',
'networkx==1.11',
'csvkit==0.9.1',
Expand Down
3 changes: 2 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,11 @@ deps =

[testenv:pywin]
basepython = {env:PYTHON:}\python.exe
passenv = *
setenv =
DBT_CONFIG_DIR = ~/.dbt
DBT_INVOCATION_ENV = ci-appveyor
commands = nosetests -v -A "type!='snowflake'" --with-coverage --cover-branches --cover-html --cover-html-dir=htmlcov test/unit test/integration
commands = nosetests -v --with-coverage --cover-branches --cover-html --cover-html-dir=htmlcov test/unit test/integration
deps =
-rrequirements.txt
-rdev_requirements.txt

0 comments on commit ce5f2f4

Please sign in to comment.