looker-pop-modeling

Implements Looker Period-over-Period LookML modeling with surrogate key hashing and BigQuery loading.

Updated Jul 7, 2026
One-click install
npx skills add https://github.com/ricardolui/gcp-custom-agent-skills --skill looker-pop-modeling-ricardolui
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: looker-pop-modeling
Source: https://github.com/ricardolui/gcp-custom-agent-skills/tree/main/c6-looker-pop-modeling
Command: npx skills add https://github.com/ricardolui/gcp-custom-agent-skills --skill looker-pop-modeling-ricardolui

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Building Period-over-Period comparisons in Looker often fails due to LookML extends inheritance clashes, missing surrogate keys on physical tables, and fragile BigQuery bulk loads. This Skill provides the architectural rules and patterns to resolve these failures and deploy a working Customer 360 PoP explore. ## Core Features & Use Cases - Dynamic Surrogate Key Hashing: Compute SHA256-based customer_hash dimensions in LookML when physical BigQuery tables lack hash columns, avoiding Unrecognized name SQL errors. - Extends Clash Resolution: Rules for structuring current_metrics and comparison_metrics views so Looker does not discard base view dimensions when extending PDTs. - PoP Explore Architecture: A semantic join pattern using base_customers, date_config parameters, snapshot joins, and comparison_rules for delta and percentage calculations. - Deployment & Data Loading: Looker SDK production deployment flow and a subprocess-based bq load pattern for resilient NDJSON ingestion. - Use Case: A data engineer building a Customer 360 dashboard needs to compare current versus prior-period account metrics; this Skill guides the LookML structure, key hashing, and BigQuery snapshot loading end to end. ## Quick Start Ask the AI to design a Looker Period-over-Period explore for customer snapshots on BigQuery with dynamic surrogate key hashing and delta measures.

Frequently Asked Questions about looker-pop-modeling

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a Period-over-Period comparison in Looker?

Structure the explore with a base_customers selector cross joined to a date_config parameter view, then left join current_metrics and comparison_metrics on a shared surrogate key. Cross join a comparison_rules view to compute absolute and percentage deltas between the two snapshots.

Why does Looker drop dimensions when extending multiple views?

Looker allows only one active derived table per view, so extending unpivoted PDTs alongside a base view causes columns from the base view to be discarded. Keep comparison views flat by extending only one-to-one logical views mapped to the primary table.

How do I create a surrogate key in LookML without a physical hash column?

Compute the key dynamically in the view using TO_HEX(SHA256(CAST(${TABLE}.customer_id AS STRING))) as a hidden string dimension. Apply this pattern in base views and refinement views so joins resolve without Unrecognized name SQL errors.

How do I load large NDJSON datasets into BigQuery from Python?

Use subprocess to invoke the native bq load CLI with NEWLINE_DELIMITED_JSON source format and the --replace flag. This approach avoids connection mutation limits that client libraries can hit during massive uploads.

Why does Looker production deployment fail with a non-fast-forward error?

The error occurs when the developer branch diverges from the remote main branch. Resolve it by pushing changes to Git, then using the Looker SDK to reset the workspace to remote, validate the project, and deploy to production.