spectacles icon indicating copy to clipboard operation
spectacles copied to clipboard

Possibility to pass a dbt pr schema in a CI run

Open simon-stepper opened this issue 3 years ago • 1 comments

When we're developing a new model in dbt and creating a new view in Looker for this model at the same time, the SQL validator always fails. I'd like to have an option where we could pass the dbt PR number and Spectacles would execute the validators against this schema instead of the normal target schema. This would be very similar to the existing dev mode, just using it in a CI run.

When we open the Looker PR before the dbt PR is merged and built in production, the underlying table in our production schema doesn't exist and hence the SQL validator fails. This is a bit annoying as we always need to execute and link a manual dev mode run to show that the Looker PR is not producing errors. We like to develop in dbt and Looker at the same time. It also is easier to review both the dbt and Looker PR in succession, as you only need to get into the problem once.

I'm not too familiar with what Spectacles can access in a PR. But as dbt pr schemata are always following a set rule, it would be nice if we could add a specific text to the Looker PR that is passed as a variable to the CI checks.

simon-stepper avatar Apr 26 '22 17:04 simon-stepper

Hey @NoToWarAlways. Thanks for creating the issue.

This is definitely something we're planning on doing in the future. I think it would likely look like a comment with a specific format in the body of the Looker PR. I don't have a fixed timeline for it (and it definitely won't be Q2 unfortunately) but it's definitely something we'll tackle in the future!

DylanBaker avatar Apr 27 '22 09:04 DylanBaker