Skip to content

[BUG] Posix operator !~ not supported on Redshift #1459

@AlexSpannSP

Description

@AlexSpannSP

Describe the bug
Models that use the !~ operator with a redshift target will not compile

What version of dbt Fusion is this bug in? (find out by running dbt --version)
dbt-fusion 2.0.0-preview.154

Is this a discrepancy between the dbt Fusion Engine and dbt Core? Check one.

  • YES
  • NO

To Reproduce
Create a dbt model:

-- models/marts/negate_posix_demo.sql
SELECT 
    'a' ~ 'a',
    'b' !~ 'c'

with redshift as a target and then try to compile it:

error: dbt0101: mismatched input '!' expecting one of <EOF>, ';'
  --> models\marts\negate_posix_demo.sql:3:9 (target\compiled\models\marts\negate_posix_demo.sql:3:9)

Expected behavior
Models using the operator compile with no issues

Operating System and CPU Type (please complete the following information):

  • Windows
  • X86

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions