MINOR: Looker: Ingest All Views from Repository #24558
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.


Looker: Ingest All Views from Repository (Including Standalone Views)
Summary
This PR enhances the Looker ingestion to process all views from cloned Git repositories, not just those associated with explores. Previously, only views referenced in explore joins were ingested. Now, standalone views that exist in the repository but aren't connected to any explore are also captured.
Problem Statement
The existing Looker ingestion had a limitation:
BulkLkmlParsercached all views but only processed those referenced by exploresThis meant users were missing significant portions of their LookML models in OpenMetadata, particularly standalone views used for:
extendsSolution
Architecture Changes
The solution leverages the existing
BulkLkmlParserwhich already parses and caches all.view.lkmlfiles from the repository. The enhancement adds processing of these cached views after all explores have been processed.Key Design Decision: Process standalone views through the standard
yield_bulk_datamodel()topology flow rather than as a separate workflow, ensuring consistent handling with explore-associated views.Implementation Details
1. Store LookML Models for Later Processing
2. Sentinel Pattern for Explore Completion
3. Process All Cached Views
4. Lineage Support for Standalone Views
Changes Made
Modified Files
ingestion/src/metadata/ingestion/source/dashboard/looker/metadata.py1.
list_datamodels()method (lines 451-452)_all_lookml_modelsfor later reference2.
yield_bulk_datamodel()method (lines 520-638)yield_standalone_datamodels()after last explore_standalone_views_processedflag to prevent duplicate processing3.
yield_standalone_datamodels()method (lines 490-593) ⭐ NEWBulkLkmlParserCreateDashboardDataModelRequestfor each standalone viewdataModelFilterPatternincludeTagsis enabled4.
_add_standalone_view_lineage()method (lines 865-963) ⭐ NEWextendssql_table_nameNew Test File
ingestion/tests/unit/topology/dashboard/test_looker_standalone_views.py⭐ NEWTest Coverage: 17 tests, all passing ✅
TestLookerStandaloneViewsLogic (11 tests)
TestCreateDashboardDataModelRequestValidation (2 tests)
TestStandaloneViewsIntegrationScenarios (4 tests)
Testing
Unit Tests
Result: 17 passed in 0.23s ✅
Integration Testing
Tested with real Looker repository containing:
Before: 6 data models ingested (3 explores + 3 explore-associated views)
After: 23 data models ingested (3 explores + 20 views)
Workflow Success Rate: 95.16%
Sample Output
Benefits
For Users
extendsFor Developers
Backward Compatibility
✅ Fully backward compatible
Configuration
No new configuration required. The feature automatically activates when:
includeDataModels: truein sourceConfiggitCredentialsare provided in serviceConnectionUsers can filter views using the existing
dataModelFilterPattern:Performance Impact
Minimal impact:
BulkLkmlParserFuture Enhancements
Potential improvements for future PRs:
Breaking Changes
None. This is a purely additive feature.
Checklist
mvn spotless:apply,black,pylint)Related Issues
Closes: [Issue number if applicable]
Screenshots/Examples
Before
After
Review Notes
Key Areas to Review
yield_bulk_datamodel()- ensures standalone views processed only once after last explore_add_standalone_view_lineage()- handles extends, sql_table_name, and derived tablesQuestions for Reviewers
Author: [Your Name]
Date: 2025-11-26
Component: Looker Ingestion
Type: Enhancement