-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
65 changed files
with
2,527 additions
and
1,400 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,6 +45,7 @@ nosetests.xml | |
coverage.xml | ||
*,cover | ||
.hypothesis/ | ||
test.env | ||
|
||
# Translations | ||
*.mo | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import dbt.adapters.postgres as postgres | ||
|
||
|
||
def reset(): | ||
postgres.connection_cache = {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import platform | ||
|
||
import dbt.exceptions | ||
|
||
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 | ||
|
||
|
||
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, | ||
'snowflake': SnowflakeAdapter, | ||
} | ||
|
||
adapter = adapters.get(adapter_type, None) | ||
|
||
if adapter is None: | ||
raise RuntimeError( | ||
"Invalid adapter type {}!" | ||
.format(adapter_type)) | ||
|
||
return adapter |
Oops, something went wrong.