Skip to content

Required keyword: 'true' missing for <class 'sqlglot.expressions.functions.If'> #5823

@jbailiss

Description

@jbailiss

Version: 0.234.1

I am trying to add primary keys to MSSQL models within a post-statement @if. I can't get beyond this error:

Required keyword: 'true' missing for <class 'sqlglot.expressions.functions.If'>

I have copied the example here but still get the same error:
https://sqlmesh.readthedocs.io/en/stable/concepts/macros/sqlmesh_macros/#prepost-statements

My research took me to this issue/comment and it looks to be very close to what I need but I can't get beyond the issue with any and all @if usage.
#4568 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions