Trino's AI functions enable calling LLMs directly from SQL queries, eliminating the need for Python notebooks or ETL pipelines. This architecture runs on Red Hat OpenShift AI and connects an Apache Iceberg lakehouse (on MinIO S3) with PostgreSQL (pgvector), a Nessie catalog, and LLM endpoints (Llama 4 Scout 17B via NVIDIA). Seven built-in AI functions cover sentiment analysis, classification, entity extraction, grammar correction, text generation, PII masking, and translation. The post walks through 34 example queries across cybersecurity, financial intelligence, and developer knowledge base domains, including hybrid vector+AI search and federated queries that join Iceberg tables on S3 with PostgreSQL in a single SQL statement. The full stack deploys on OpenShift in under 10 minutes via a single install script.

11m read timeFrom developers.redhat.com
Post cover image
Table of contents
The architectureWhat are AI functions?Why this matters: Data meets modelQuery UI in action34 examples: From security analysis to financial intelligencePart of a modern data meshRed Hat OpenShift AI: The platform advantageHybrid search: When vectors meet AI functionsFederated queries: Joining across data sourcesGet startedReferences
274 Impressions