generate-view-from-table
Generate Bronze View from Table (generate-view-from-table)
Overview and goal
In the Medallion LookML architecture (agentic-lookml), every physical database table is represented by a 1:1 autogenerated view in bronze/:table.view.lkml. Agents must never hand-write or hand-edit bronze/:table.view.lkml files. Run this skill for all physical tables referenced in the SQL queries every time (and whenever lkr parse sql-lookml-compare reveals a missing Bronze view or unmodeled_db_columns) so bronze/:table.view.lkml is always generated or refreshed directly from the database schema before authoring any refinements, Silver *_fields views, NDTs, or Explores.
Detecting missing or stale Bronze views with sql-lookml-compare
Run lkr parse sql-lookml-compare against the SQL query and local LookML project directory:
uv run lkr parse sql-lookml-compare \
--sql "SELECT o.order_id, o.user_id, o.total_amount FROM analytics.ecomm.orders AS o" \
--path ./lookml_project
Inspect each QueryLookmlMapping entry in queries[] by comparing parsed_query.tables against views: