-
-
Notifications
You must be signed in to change notification settings - Fork 84
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
fix: Resolve error when cloning Python models (#645) #651
fix: Resolve error when cloning Python models (#645) #651
Conversation
4e59ebd
to
a5fdfa2
Compare
@jessedobbelaere @Jrmyy @mattiamatrix @nicor88 @svdimchenko Anything else you need fro me ahead of review? I'm happy to wait if you're crunched for review time right now, just want to make sure this doesn't fall through the cracks! |
@Avinash-1394 do you mind to have a look as well? |
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.
Thanks for the fix @jeancochrane
Description
Currently, it is not possible to clone Python models using
dbt clone
because of an outdated reference in thecreate_or_replace_view
macro to asql
context variable that returnsNone
for Python models. This PR represents a one-line change to update that reference to the newercompiled_code
context variable that implements the exact same logic assql
but supports Python models as well.Closes #645.
Models used to test - Optional
Tests have been added to the
tests/functional/adapter/test_python_submissions.py
file under a new classTestPythonClonePossible
. The models defined by this test were used for testing. It didn't seem like unit testing was appropriate in this case, so I focused exclusively on functional testing instead.Checklist