Skip to content

[Bug] Ending a description block with a single quote causes compile errors in production #1990

@HHammond

Description

@HHammond

Kind of an odd one, I usually wrap my descriptions in backticks. My latest one ended with a single ' character which caused the model to fail.

The model fine with dataform run --actions 'my_action' but failed in production. Running a model locally does not render the description block, but running it in production dataform does.

Here's a minimal example to trigger the issue

config {
  type: "view",
  description: `Description that ends with '`
}
SELECT 1

And here's a trimmed output that it compiles to:

            CREATE OR REPLACE VIEW `foo.my_view`
    OPTIONS(description='''Description that ends with '''')
                                                      ^^^^ ends the descrption and opens a new string literal

I suspect adding triple quotes inside the block triggers the same failure path, but I haven't tested it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions