A complete guide to generating, running, and visualizing data using Trino + Metabase
π§ What is Next Plus Report Builder?
NP Trino is an AI chatbot custom-trained for Next Plus. It helps users:
Ask natural-language questions and get instant SQL answers
Write complex queries for Trino 450
Query data stored in MongoDB catalogs
Generate ready-to-run queries for Metabase
Build better dashboards, faster β with no SQL background required
π§° What Can I Use It For?
You can ask NP Trino to help with:
Inventory reports
QA field monitoring
Work order analysis
Session and production metrics
User performance tracking
Maintenance & service insights
R&D / NPI experimentation
π¬ Example Questions You Can Ask
π’ Beginner:
"Show all stock with quantity less than 10"
"How many sessions ran this week?"
"List open work orders by status"
π‘ Intermediate:
"Give me average torque per operator"
"Workflows with high rework rate"
"Show invalid quantity per work order"
π΄ Advanced:
"Compare defect rate across workflows over time"
"Field values out of range by user and step"
"Sessions longer than median duration this month"
π How to Ask a Good Question
Structure your question like this:
What | How | Example |
Goal | Describe your need | "I want to track invalid items" |
Context | Mention table(s) | "...in |
Filters | Time/user/etc. | "...for the last 30 days" |
Output | What to see | "...by user and workflow" |
β You donβt need to write SQL. Just describe the insight you're after.
β Step-by-Step: From Problem to Dashboard
Letβs walk through a real scenario:
π§ Problem: βI want to find out which users produced invalid itemsβ
πΉ Step 1: Ask the Chatbot
Open the NP Trino Chatbot and type:
Hi, I want to see total invalid quantity per user, grouped by workflow name
The bot replies with:
SELECT "workflowname", "userid", SUM("invalidquantity") AS "total_invalid" FROM "workflowsessionitem" GROUP BY "workflowname", "userid" ORDER BY "total_invalid" DESC
πΉ Step 2: Open Metabase
Log into your Next Plus Metabase
Click β New (top right)
βSelect SQL Query
Choose your Trino MongoDB data source
Paste the query you got from NP Trino
Click βΆοΈ Run
π₯ You now see a table showing invalid totals by user + workflow
πΉ Step 3: Improve the Query (Optional)
Ask NP Trino to enhance the query:
Can you add valid quantity and calculate defect rate percentage?
It will return:
SELECT "workflowname", "userid", SUM("validquantity") AS "valid", SUM("invalidquantity") AS "invalid", ROUND(100.0 * SUM("invalidquantity") / NULLIF(SUM("validquantity") + SUM("invalidquantity"), 0), 2) AS "defect_rate" FROM "workflowsessionitem" GROUP BY "workflowname", "userid" ORDER BY "defect_rate" DESC
πΉ Step 4: Save & Visualize
Click βSaveβ β name your query
Click + Add to Dashboard
Choose visualization: Bar Chart, Table, or Line
Add filters (e.g., time range, user)
β Done β you now have a reusable chart for your team
π Tips for Non-SQL Users
Ask like you talk: "Show me work orders overdue"
Use filters: date range, workflow, user
Combine: Ask for joins (e.g., get usernames instead of IDs)
Copy-Paste Ready: Every query from NP Trino works out-of-the-box
π― Example Goals by Role
Role | Questions to Ask |
π·ββοΈ Production Manager | Sessions per workflow, First pass rate, Output by SKU |
π§ͺ QA Analyst | Field values out of range, Average per user, Field trends |
π§ Operations | Most active users, Inactive users, SLA by WO |
π§ Maintenance | Components used, RMA cycles, Service durations |
π NPI Engineer | Prototype data trends, Field deviation, Median step times |
π Quick Commands to Try
List sessions with 0 valid quantity Work orders with no output QA field entries this week Step durations above average Most used QA fields
π‘ What Else Can NP Trino Do?
Explain your query line-by-line
Debug a failing query
Recommend best fields to use
Suggest joins and filters
Teach you SQL as you go