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

add test for incremental model #197

Merged
merged 1 commit into from
Jul 18, 2022
Merged

Conversation

ChenyuLInx
Copy link
Contributor

@ChenyuLInx ChenyuLInx commented Jul 13, 2022

Adding test for incremental python model
This test works fine locally, just didn't change the core version so everything is failing now

@cla-bot cla-bot bot added the cla:yes label Jul 13, 2022
@ChenyuLInx ChenyuLInx requested review from stu-k and jtcohen6 July 13, 2022 22:01
@ChenyuLInx ChenyuLInx marked this pull request as ready for review July 13, 2022 22:01
df = dbt.ref("m_1")
if dbt.is_incremental:
# incremental runs should only apply to
df = df.filter(df.id >= session.sql(f"select max(id) from {dbt.this}").collect()[0][0])
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jtcohen6 I couldn't figure out a better way to do this with a dataframe. Probably something that we can surface with the snowpark team

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't really like this but also couldn't figure out a way to get around it for now even with max. I feel okay leaving it like this for now

Copy link
Contributor

@stu-k stu-k left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@ChenyuLInx ChenyuLInx merged commit d4fdbcd into feature/python-model-v1 Jul 18, 2022
@ChenyuLInx ChenyuLInx deleted the incremental_test branch July 18, 2022 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants