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 newline around model SQL in incremental materialization #1018

Closed
drewbanin opened this issue Sep 20, 2018 · 1 comment
Closed

add newline around model SQL in incremental materialization #1018

drewbanin opened this issue Sep 20, 2018 · 1 comment
Labels
bug Something isn't working
Milestone

Comments

@drewbanin
Copy link
Contributor

Issue

Issue description

A change to the incremental materialization code in 0.11.0 causes incremental models to fail if the last line of the model contains a comment: fa43d9d

This change puts the closing paren for the incremental subquery on the same line as the model itself, so line comments will also comment out our closing paren.

Instead, this code should happen on three different lines. Let's add a test for this just in case, as it's a very easy thing to miss. In general, we should be more mindful of interpolating sql on the same line as materialization code.

System information

0.11.x

Steps to reproduce

Run this model code:

{{ config(materialized='incremental', sql_where='true') }}

select
  1 as id -- a closing paren will be injected at the end of this comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant