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

Reimplement get_relation to handle custom schemas #52

Merged
merged 3 commits into from
Feb 4, 2020

Conversation

jtcohen6
Copy link
Contributor

@jtcohen6 jtcohen6 commented Feb 4, 2020

Copy link
Contributor

@drewbanin drewbanin left a comment

Choose a reason for hiding this comment

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

Looks great! Ship it :D

@drewbanin
Copy link
Contributor

drewbanin commented Feb 4, 2020

(but also, fix the pep8 issues that found their way into master if you can)

@jtcohen6
Copy link
Contributor Author

jtcohen6 commented Feb 4, 2020

Yup, looks like the pep8 errors (in connections.py) shipped with some other code. I'll just push a fix to this branch.

@jtcohen6
Copy link
Contributor Author

jtcohen6 commented Feb 4, 2020

@drewbanin Could you look at the failing unit test test_http_connection?

@drewbanin
Copy link
Contributor

@jtcohen6 I think this was broken when this line changed:

https://github.com/fishtown-analytics/dbt-spark/blob/0171a25adb37c76449cafc9e07bfbf4e3f98970a/dbt/adapters/spark/connections.py#L19-L21

We just want to call .strip() on that string to remove the leading and trailing whitespace, eg:

SPARK_CONNECTION_URL = '''
https://{host}:{port}/sql/protocolv1/o/{organization}/{cluster}
'''.strip()

When I pop open the debugger, I see that this whitespace impedes the parsing of the url:

Screen Shot 2020-02-04 at 12 54 00 PM

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.

Custom schemas: table already exists
2 participants