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

Adding support for SQLite #56

Merged
merged 2 commits into from Oct 22, 2019
Merged

Adding support for SQLite #56

merged 2 commits into from Oct 22, 2019

Conversation

ak-gupta
Copy link
Contributor

In this pull request I have added support for SQLite as well as an additional feature for Snowflake users. If the user supplies schema in their credentials, locopy.snowflake.Snowflake will run USE SCHEMA {schema} for the user.

Fixes #50
Fixes #55

@fdosani
Copy link
Member

fdosani commented Oct 21, 2019

@ak-gupta I think for the failing tests we can change the dev requirements files to the following:

psycopg2>=2.7.7
pg8000>=1.13.1
snowflake-connector-python>=1.7.6

Just set the connectors to be >=

Copy link
Member

@fdosani fdosani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think tweaking the requirements file will help the tests pass if you have some time to push that.
Thanks for the PR too!

Copy link
Member

@fdosani fdosani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. @jborchma You ok with this change?

@ak-gupta
Copy link
Contributor Author

Oh, do I need to increment the version before merging to master?

@fdosani
Copy link
Member

fdosani commented Oct 21, 2019

Oh, do I need to increment the version before merging to master?

No need. I'll take care of that once we are ready to cut a new release.

@ak-gupta
Copy link
Contributor Author

Ok great, just wanted to make sure!

Copy link
Collaborator

@jborchma jborchma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Just a small question.

@@ -110,7 +110,7 @@ def _disconnect(self):
else:
logger.info("No connection to close")

def execute(self, sql, commit=True, params=None):
def execute(self, sql, commit=True, params=()):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am curious about this change here. Is this to align with some convention for SQLite?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, when I tried to use Database with params=None it didn't work

@fdosani fdosani merged commit f63f439 into capitalone:master Oct 22, 2019
@fdosani fdosani mentioned this pull request Nov 1, 2019
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.

Adding a "USE SCHEMA" call for Snowflake Support for SQLite3
3 participants