-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
adapters: postgres & redshift #259
Merged
Merged
Changes from 29 commits
Commits
Show all changes
49 commits
Select commit
Hold shift + click to select a range
3145139
initial commit, acquire_connection working for postgres with unit test
13fe3e5
cleanup strings, add docker unit test harness
973c4ad
move execute_without_auto_commit to postgres adapter
f4f0b41
wired in w/ strict mode
d0a6f17
turn strict mode on for all tests, not just default ones
32e20a3
add schema to unit test harness
9a46a2e
merged development
c612333
back to pep8 compliance
7023921
again, improve test harness
e848e59
remove now-unused test scripts
7076a7d
implement connection sharing w/ test, reset cache on dbt invocation i…
b2e31c9
move drop into adapter
0886bc4
add truncate, rename functions & add master exception handler
31502f8
back to pep-8 compliance
f6e0813
test harness++
4a6750e
snowflake integration test (not really working yet)
5676c34
added snowflake adapter
dcb8278
tearing out most of schema helper
7a52b80
schema helper is dead (long live schema helper)
6251c07
possibly snowflake-ready?
64ee3eb
snowflake workin
d2ea805
merged development
62f2f68
snowflake / circle test harness
6023586
merged development
ec50446
two more tests
a5e71f0
get back into pep8 compliance
9c95a92
debug setup_db.sh
3a157fd
display a reasonable status message
114fb91
add date functions all around
b959fb8
use absolute import to resolve ns conflict
f5d7be8
group tests by warehouse type
2913e81
Merge branch 'development' of github.com:analyst-collective/dbt into …
736dcf9
remove targets from seeder, and mark it as not implemented for snowflake
cd1fe4f
pep8
7c0f26b
rip snowflake support out for windows
6cf9684
fix appveyor
887fe85
only do snowflake imports in snowflake adapter module
2c0e5ec
fix SnowflakeAdapter NameError
6be3d44
improved error handling
6e14eb8
pep8
95e4a75
Merge branch 'development' of github.com:analyst-collective/dbt into …
4970d6d
update required version of snowflake connector
15be495
run tests on python 3.6 instead of 3.5
64e4b67
add python 3.6 to global pyenv
e30931a
also isntall python 3.6
527eaa8
install!
67cc3b4
sudo !!
73cde44
try python 2.7.12
2b3e8dd
sneak in a logger name change, and CHANGELOG
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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,22 @@ | ||
from dbt.adapters.postgres import PostgresAdapter | ||
from dbt.adapters.redshift import RedshiftAdapter | ||
from dbt.adapters.snowflake import SnowflakeAdapter | ||
|
||
|
||
def get_adapter(profile): | ||
adapter_type = profile.get('type', None) | ||
|
||
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've been meaning to talk to you about this. The reason these tests didn't previously use Docker is because we wanted to run CI tests on Windows (via Appveyor). My understanding is that when these tests now run on Appveyor, we're not actually testing if the code works on Windows. Rather, we're testing if it runs in Docker on Windows. Is that what's happening here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's not exactly right, since circle & appveyor don't use the Makefile to run tests -- they just call tox directly. The reason to do it this way is so that the tests always run in the same environment during development.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok makes sense, thanks