The script in this gist validation_results.py
gets cached and non-cached LookML validation results from the Looker API and prints them out to the console. This can be helpful when debugging unexpected responses from Looker, particularly in tools like Spectacles.
To run the script, do the following:
(1) Install the necessary requirements.
pip install -U spectacles httpx asyncio
(2) Copy the file and add it to your machine. Fill out the variables on lines 16-18.
(3) Create a file with the script above and run it.
python validation_results.py
This will print out an output like below.
cached results:
{'errors': [], 'models_not_validated': [], 'computation_time': 1.3808789253234863, 'stale': False, 'project_digest': '9c26e1dedbebc9d46a0d9c8f175a4db08b8d7758'}
non-cached results:
{'errors': [], 'models_not_validated': [], 'computation_time': 2.387660026550293, 'project_digest': '9c26e1dedbebc9d46a0d9c8f175a4db08b8d7758'}