Skip to content

Conversation

@adrianburusdbt
Copy link
Contributor

Problem
The regex pattern used for validation (^\sdbt\s+....$) doesn't match newline characters with .*, causing multi-line commands like the following to fail validation:

execute_steps = [<<-EOT
dbt run --select    
  my_project,config.materialized:view,state:modified,tag:my_tag    
  my_project,config.materialized:table,tag:my_tag    
  my_project,config.materialized:incremental,tag:my_tag
EOT
]

Solution
Normalize commands by replacing newlines (\n and \r) with spaces before running the regex validation. This matches how dbt Cloud interprets these commands - newlines are treated as whitespace separators.

@adrianburusdbt adrianburusdbt requested a review from a team as a code owner January 13, 2026 14:35
Copy link
Member

@vladmld vladmld left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏼

@adrianburusdbt adrianburusdbt merged commit 32de5d9 into main Jan 15, 2026
7 checks passed
@adrianburusdbt adrianburusdbt deleted the issue-600 branch January 15, 2026 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dbtcloud_job.validate_execute_steps does not work with multi-line commands

3 participants