Compile a KPI definitions glossary from the SQL that computes them

A KPI glossary with each formula in words, source tables, filters and known caveats.

Choose one of three approaches. The steps for that option appear below.

Choose an option above. On a phone, swipe the tabs left or right to see all options →

GitHub Copilot: drafts formulas and a KPI glossary

GitHub Copilot extracts formulas and drafts the glossary; you check queries, rule on discrepancies and approve or hold.

  1. You

    Collect queries and official KPI

  2. GitHub Copilot

    Draft formulas, glossary and discrepancy

  3. You

    Check every KPI and rule

  1. Collect queries and official KPI definitions

    Use: You

    Have ready: all dashboard SQL queries and official KPI definitions in one folder; check the set matches the live dashboard.

    Check

    Proprietary queries go into an external tool only if your organisation's rules allow it; this record does not establish that upload is permitted.

  2. Draft formulas, glossary and discrepancy list

    Use: GitHub Copilot

    Ask GitHub Copilot for CSV: KPI, formula, tables, filters, query_ref; check five queries before asking for glossary entries and discrepancies.

    Details

    What to paste into the tool

    Task: Draft formulas (CSV: KPI, formula, tables, filters, query_ref). For each SQL file, explain the query and return a CSV row: KPI name, formula in words, source tables, filters, and the file name as query_ref. Describe only what the code computes. Task: Draft glossary and discrepancy list. Using this CSV, the official definitions and the query files, draft a glossary entry per KPI: formula in words, source tables and filters as given in the CSV, and caveats visible in the query referenced by query_ref. Then list every difference between the CSV formulas and the official definitions. Do not decide which is right.

  3. Check every KPI and rule on discrepancies

    Use: You

    Check glossary wording against queries and official definitions; add missing differences, record which definition is right and why, then approve or hold.

    Check

    Check five queries against extracted formulas, filters and tables; correct mismatches before glossary drafting. Each KPI's wording matches its query and the owner has ruled on each discrepancy. The glossary does not redefine KPIs Nothing real is opened with the assistant.

Before you paste into any AI tool, remove any confidential information. Put it back at the end.

Tools in this workflow

Final check

Each KPI's wording matches its query.

Discrepancies with the official definitions are listed.

The KPI owner rules on each discrepancy.

Formulas come from the code only.

Check data-handling rules before placing proprietary queries into any tool.

Check the result against your original inputs. Approve it before sharing or acting.

What still needs checking
  • Whether proprietary queries may be placed into any of these tools is for the organisation to confirm.

Share this page