---
title: "Using AI_Functions in Your Data Warehouse: Top Use Cases"
description: "Databricks AI Functions bring model inference into SQL queries, addressing the need to combine warehouse-resident structured data with unstructured reviews, tickets, PDFs, and transcripts without exporting rows to a separate service. The post presents six Lakehouse use cases: document parsing and extraction, sentiment classification, translation, ticket routing, sales-call extraction, and generative drafting with ai_query. Task-specific functions such as ai_parse_document, ai_extract, ai_classify, and ai_translate handle specialized work, while ai_query sends prompts to an accessible Databricks-hosted Foundation Model serving endpoint. Unity Catalog permissions, existing pipelines, and system.billing.usage keep governance and billing within Databricks, while SQL execution manages planning, parallelization, and retries. Production guidance includes tagging jobs, sampling at least 10,000 rows, choosing models deliberately, requesting structured output, and versioning prompts."
---

# Using AI\_Functions in Your Data Warehouse: Top Use Cases

[Databricks](https://yomu.fyi/company/databricks) · Srikant Das, Ismail Makhlouf · Aug 14, 2026

**Type:** Tutorial

## Summary

Databricks AI Functions bring model inference into SQL queries, addressing the need to combine warehouse-resident structured data with unstructured reviews, tickets, PDFs, and transcripts without exporting rows to a separate service. The post presents six Lakehouse use cases: document parsing and extraction, sentiment classification, translation, ticket routing, sales-call extraction, and generative drafting with ai\_query. Task-specific functions such as ai\_parse\_document, ai\_extract, ai\_classify, and ai\_translate handle specialized work, while ai\_query sends prompts to an accessible Databricks-hosted Foundation Model serving endpoint. Unity Catalog permissions, existing pipelines, and system.billing.usage keep governance and billing within Databricks, while SQL execution manages planning, parallelization, and retries. Production guidance includes tagging jobs, sampling at least 10,000 rows, choosing models deliberately, requesting structured output, and versioning prompts.

## Context

Traditional warehouse workflows keep structured data in the warehouse and unstructured data elsewhere, requiring analysts to export rows to external AI services and manually stitch predictions back into tables. The post identifies this as slow, fragile when schemas change, and a source of security and governance risks.

## Approach / What changed

Use Databricks AI Functions inside SQL queries and existing Lakehouse pipelines. Specialized functions parse documents, extract fields, classify text, and translate content, while ai\_query supports general prompting against an accessible Databricks-hosted Foundation Model serving endpoint. The workflow remains under Unity Catalog governance, with usage recorded in system.billing.usage.

## Takeaways

- ai\_parse\_document can turn invoice PDFs or images into JSON, after which ai\_extract produces selected entities as structured table fields within one query plan.
- ai\_classify supports zero-shot labeling for sentiment, support-ticket intent, and urgency without requiring model training; ai\_translate can normalize multilingual reviews before downstream analysis.
- For production, the post recommends tagging jobs, testing at least 10,000 rows, choosing models based on cost and capability, requesting typed structured output where appropriate, and versioning prompts like code.

**Tags:** [Architecture](https://yomu.fyi/topic/architecture), [Data Pipelines](https://yomu.fyi/topic/data-pipelines), [LLMs](https://yomu.fyi/topic/llm), [Machine Learning](https://yomu.fyi/topic/machine-learning)

- Source: [Databricks](https://www.databricks.com/blog/using-aifunctions-your-data-warehouse-top-use-cases)
- Source URL: https://www.databricks.com/blog/using-aifunctions-your-data-warehouse-top-use-cases
- Ingested by Yomu: 2026-08-30T16:51:15.863Z

[Read original post](https://www.databricks.com/blog/using-aifunctions-your-data-warehouse-top-use-cases)
