Skip to content

[BUG] "Invalid identifier edwSequence" in satellite models #433

@nancypham

Description

@nancypham

Describe the bug

The edwSequence field is not being created in the stage model when the sequence parameter is used. Models downstream of the stage model that expect that field are failing with the error "Invalid identifier edwSequence".

Environment

  • dbt version: core v1.8.8
  • datavault4dbt version: v1.11.0
  • Database/Platform: Snowflake

To Reproduce

  • Create a stage model with sequence parameter.
  • Create a satellite model with that stage model as the source_model value.
  • Run dbt_run for that model and this dbt error message appears:
SQL compilation error: error line ## at position #
invalid identified 'EDWSEQUENCE'

Expected behavior
Stage models when built with a sequence parameter include the edwSequence field and downstream models do not have the error "Invalid identifier edwSequence".

Additional context
The error is resolved in the stage.sql file, when applying one of these two solutions:

  1. Change stage_sequence on L134 to sequence
    OR
  2. Change sequence=sequence on L176 and L189 to sequence=stage_sequence

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