Hey! I am exploring options on how I can develop in LookML locally / set-up other developers with the ability to do this so we can avoid the slow Website IDE load times and clunky feel when navigating it.
I am mostly set-up but the missing component to make this a flawless experience is having the ability to validate the LookML Code within the working branch.
Has anyone got any ideas of how I could emulate Lookers 'Validate LookML' button in my local IDE via a script or some other method?
I have tried using spectacles API but ran into a dead-end as I can't get it to complete a run / it takes forever.
I simply want a solution to return any errors within the files that have been edited in my working branch OR files that have been effected by the changes.
Hello Kai_walker-1663
The API call to validate a project's lookml is described here: https://cloud.google.com/looker/docs/reference/looker-api/latest/methods/Project/validate_project
Please take a shot at leveraging this API in your scripts and circle back if you run into issues. A couple notes:
1) I presume you already know based on your use case, but you'll want to make sure you've checked out the right project branch before running the validate.
2) This endpoint runs a full re-validation, which does not leverage cache to the degree that the IDE validate process now does: you may see validations take somewhat longer. FYI - I see inidications may be possible to utilize the faster(essentially, assess new lookml only), but this is not documented and would not be directly supported/guaranteed to work in future..