<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/github---oivoodoo-phoenix-lens-analytics-dashboard-for-your-repo--sk8ac4lma" -->

---
title: GitHub - oivoodoo/phoenix_lens: Analytics dashboard for...
description: Phoenix Lens is a mountable SQL notebook library for Phoenix/Ecto applications, providing a PgHero-style analytics dashboard at a chosen route. It lets...
canonical: https://daily.dev/posts/github---oivoodoo-phoenix-lens-analytics-dashboard-for-your-repo--sk8ac4lma
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: GitHub - oivoodoo/phoenix_lens: Analytics dashboard for your Repo. | daily.dev
og:description: Phoenix Lens is a mountable SQL notebook library for Phoenix/Ecto applications, providing a PgHero-style analytics dashboard at a chosen route. It lets...
og:url: https://daily.dev/posts/github---oivoodoo-phoenix-lens-analytics-dashboard-for-your-repo--sk8ac4lma
og:image: https://api.daily.dev/og/posts/SK8ac4Lma.png
og:image:alt: GitHub - oivoodoo/phoenix_lens: Analytics dashboard for your Repo.
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# GitHub - oivoodoo/phoenix_lens: Analytics dashboard for your Repo.

**[ElixirStatus](https://daily.dev/sources/elixirstatus)** · 5 min read · 0 upvotes · 0 comments

## Summary

Phoenix Lens is a mountable SQL notebook library for Phoenix/Ecto applications, providing a PgHero-style analytics dashboard at a chosen route. It lets developers write ad-hoc SQL or notebook-style questions against their Ecto Repo, pin dashboards, and mask PII/PHI fields automatically via configured masked_fields or Ecto's redact: true. Queries are view-only (writes rejected), and it supports an optional DuckDB engine for joining Postgres with other sources like MySQL, SQLite, Parquet, CSV, or JSON. Additional features include an MCP server so AI agents can query the same notebook with masked results, saved-question alerts via email or webhook, and optional TOTP/passkey security locks. It can run mounted inside a Phoenix app or standalone via Docker, and explicitly is not HIPAA or GDPR certified.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://github.com/oivoodoo/phoenix_lens>

## Questions this post answers

### How can I let an AI agent query my Phoenix app's database without exposing PII?

Phoenix Lens exposes an MCP server at /lens/mcp that lets agents run catalog, SQL, question, and dashboard tools over Model Context Protocol while enforcing the same field-policy masking as the UI, so masked cells still return as [redacted]. Agents authenticate with a project token issued in Settings, using a bearer secret prefixed lns_.

_daily.dev surfaces practical patterns for wiring agents into internal data tools like this._

### How do I mask PII fields like email in an Elixir Ecto-based dashboard?

Configure masked_fields in the phoenix_lens config (for example :email, :first_name, :last_name, :phone), and any Ecto field marked redact: true is protected automatically. Masked columns render as [redacted] in native SQL results, notebooks, CSV exports, dashboards, and alert payloads, even when selected under an alias like email AS contact.

_developers wiring PII masking into Elixir apps can track approaches like this on daily.dev._

### Can I join PostgreSQL with MySQL or CSV data in one query using Phoenix Lens?

Yes, switching the query engine to DuckDB in /lens/settings attaches the host Ecto Repo read-only as repo and lets you attach extra Postgres URLs, SQLite, DuckDB files, Parquet, CSV, or JSON as additional sources, all queryable in a single SQL statement using alias.table syntax alongside the host tables.

_teams comparing cross-source query engines can follow tools like this on daily.dev._

## Similar posts on daily.dev

- [GitHub - ohhi-vn/logger\_dashboard: Dashboard logger for log from ClickhouseExLogger](https://daily.dev/posts/github---ohhi-vn-logger-dashboard-dashboard-logger-for-log-from-clickhouseexlogger-yvpum4xh8) · ElixirStatus · 0 upvotes · 0 comments
- [GitHub - oivoodoo/pghero-elixir](https://daily.dev/posts/github---oivoodoo-pghero-elixir-tyqdpnobm) · ElixirStatus · 0 upvotes · 0 comments
- [Oxynote: Self-Hosted Wiki with Live Metrics \(Docker Guide\)](https://daily.dev/posts/oxynote-self-hosted-wiki-with-live-metrics-docker-guide--wsiiz3non) · Noted · 19 upvotes · 1 comments
- [Lumen 1.4.0 Release](https://daily.dev/posts/lumen-1-4-0-release-oivtn6yi5) · Planet Python · 0 upvotes · 0 comments
- [Phoenix LiveView beyond SaaS: Robotics fleet management](https://daily.dev/posts/phoenix-liveview-beyond-saas-robotics-fleet-management-tisyoo16o) · Curiosum · 0 upvotes · 0 comments

---

Tags: [#data-privacy](https://daily.dev/tags/data-privacy), [#elixir](https://daily.dev/tags/elixir), [#duckdb](https://daily.dev/tags/duckdb), [#ecto](https://daily.dev/tags/ecto)

[View this post on daily.dev](https://daily.dev/posts/github---oivoodoo-phoenix-lens-analytics-dashboard-for-your-repo--sk8ac4lma)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"GitHub - oivoodoo/phoenix_lens: Analytics dashboard for your Repo.","url":"https://daily.dev/posts/github---oivoodoo-phoenix-lens-analytics-dashboard-for-your-repo--sk8ac4lma","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/github---oivoodoo-phoenix-lens-analytics-dashboard-for-your-repo--sk8ac4lma"},"datePublished":"2026-09-24T09:52:48.936Z","dateModified":"2026-09-24T09:53:12.591Z","description":"Phoenix Lens is a mountable SQL notebook library for Phoenix/Ecto applications, providing a PgHero-style analytics dashboard at a chosen route. It lets...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/87a4a5bec5957a9acff5d257e4d60f13?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/87a4a5bec5957a9acff5d257e4d60f13?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"ElixirStatus","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"ElixirStatus","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/22e4640538124187827caf8cc8e39190","url":"https://daily.dev/sources/elixirstatus"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/github---oivoodoo-phoenix-lens-analytics-dashboard-for-your-repo--sk8ac4lma","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"data-privacy,elixir,duckdb,ecto","timeRequired":"PT5M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"ElixirStatus","item":"https://daily.dev/sources/elixirstatus"},{"@type":"ListItem","position":3,"name":"GitHub - oivoodoo/phoenix_lens: Analytics dashboard for your Repo."}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/github---oivoodoo-phoenix-lens-analytics-dashboard-for-your-repo--sk8ac4lma#faq","mainEntity":[{"@type":"Question","name":"How can I let an AI agent query my Phoenix app's database without exposing PII?","acceptedAnswer":{"@type":"Answer","text":"Phoenix Lens exposes an MCP server at /lens/mcp that lets agents run catalog, SQL, question, and dashboard tools over Model Context Protocol while enforcing the same field-policy masking as the UI, so masked cells still return as [redacted]. Agents authenticate with a project token issued in Settings, using a bearer secret prefixed lns_. daily.dev surfaces practical patterns for wiring agents into internal data tools like this."}},{"@type":"Question","name":"How do I mask PII fields like email in an Elixir Ecto-based dashboard?","acceptedAnswer":{"@type":"Answer","text":"Configure masked_fields in the phoenix_lens config (for example :email, :first_name, :last_name, :phone), and any Ecto field marked redact: true is protected automatically. Masked columns render as [redacted] in native SQL results, notebooks, CSV exports, dashboards, and alert payloads, even when selected under an alias like email AS contact. developers wiring PII masking into Elixir apps can track approaches like this on daily.dev."}},{"@type":"Question","name":"Can I join PostgreSQL with MySQL or CSV data in one query using Phoenix Lens?","acceptedAnswer":{"@type":"Answer","text":"Yes, switching the query engine to DuckDB in /lens/settings attaches the host Ecto Repo read-only as repo and lets you attach extra Postgres URLs, SQLite, DuckDB files, Parquet, CSV, or JSON as additional sources, all queryable in a single SQL statement using alias.table syntax alongside the host tables. teams comparing cross-source query engines can follow tools like this on daily.dev."}}]}
```

