spectacles-ci / spectacles

A continuous integration tool for Looker and LookML.
https://spectacles.dev
MIT License
217 stars 35 forks source link

Skip Explores without dimensions #715

Closed joshtemple closed 1 year ago

joshtemple commented 1 year ago

Change description

This change modifies Spectacles SQL validation behavior from raising an exception on Explores with zero dimensions to instead logging a warning and marking the Explore as skipped.

Here's an example of the output. Note the warning log and the improvement in the "Testing" header, as well as eye_exam.users__no_dims being marked as skipped with a reason for skipping.

(spectacles) ➜ spectacles sql --project eye_exam --branch dev-josh-temple-8m75 --incremental
Connected to Looker version 23.6.53 using Looker API 4.0
Warning: Explore 'users__no_dims' does not have any non-ignored dimensions and will not be validated.

=================== Testing 2/5 explores [concurrency = 10] ====================

✓ eye_exam.users passed
✓ eye_exam.users__fail skipped (unmodified)
✓ eye_exam.users__fail_and_warn skipped (unmodified)
✓ eye_exam.users__no_dims skipped (no dimensions)
✓ eye_exam.users__warn passed

Type of change

Checklists

Security

Code review