Key Concepts
- Looker Continuous Integration (CI): A process that automates the testing and validation of Looker code changes before they are deployed.
- Content Validator: Checks for errors within Looker content, such as dashboards and Looks.
- SQL Validator: Verifies the correctness of SQL code used in Looker models and explores.
- Assert Validator: Checks the results of data tests defined within Looker.
- Dimension: A field in Looker that represents a descriptive attribute of data.
- Explorer: A Looker interface that allows users to query and visualize data.
- Data Tests: Assertions defined in Looker to verify data integrity and correctness.
Content Validator Errors
The Content Validator identifies issues within Looker content like dashboards and Looks. Two common errors discussed are:
-
Bad Field Reference: This occurs when a field used in a dashboard or Look is missing or has been removed.
- Example: A dashboard breaks because the "dewpoint" field is no longer available.
- Troubleshooting:
- Check for simple spelling errors in the field name.
- Investigate if the field was deleted.
- Verify if a necessary join is missing.
- Confirm if the field still exists in the underlying table.
- If the change was intentional, update downstream dashboards to remove the reference to the missing field.
-
Missing Explorer: This error arises when an Explorer that was defined and is crucial for a Look or dashboard is no longer present.
- Troubleshooting: Similar to "Bad Field Reference," this involves checking for deletion, missing joins, or the field's existence.
SQL Validator Errors
The SQL Validator focuses on the accuracy of SQL code within Looker.
- Column Doesn't Exist: This is the most frequent error encountered. It signifies a mismatch between the column name referenced in Looker's SQL and the actual column name in the dataset.
- Example: A dimension named "station" is incorrectly spelled as "STNN," leading to an error because "STNN" does not exist in the table.
- Solutions:
- Double-check spelling: Carefully review the spelling of the dimension name in Looker.
- Use Looker SQL Runner:
- Execute
SELECT *to view a few rows of each data column. - This allows you to see the dataset's column names and match them accurately with your Looker dimensions.
- Execute
Assert Validator Errors
The Assert Validator checks the status of data tests.
-
Tests Don't Pass: This is a straightforward warning indicating that data tests are functioning correctly by flagging data issues.
- Troubleshooting: Examine the dataset, SQL query, or extended models to understand why the tests are failing.
-
Tests Aren't Configured Correctly (Bad Assertion): This error means the data test itself is not set up properly.
- Explanation: Data tests should yield a binary outcome: either "yes" (pass) or "no" (fail). If a test does not result in one of these clear outcomes, it needs to be rewritten.
Conclusion
The video provides a practical overview of common errors encountered during Looker Continuous Integration, specifically focusing on the Content Validator, SQL Validator, and Assert Validator. It offers actionable steps and troubleshooting techniques for resolving issues like non-existent columns, missing fields, and improperly configured data tests. The presenter encourages users to consult Looker documentation for more comprehensive information and to tailor their CI configurations to address their team's specific challenges, aiming to reduce errors in their Looker workflow.
AI summaries can miss context or contain errors. Check important details against the original video.