option
Home
News
Databricks Unleashes AI SQL Functions with Foundation Models

Databricks Unleashes AI SQL Functions with Foundation Models

May 21, 2025
236

Databricks is shaking up the world of data analytics with its innovative AI SQL functions, which are powered by foundation models. These tools seamlessly blend into your existing data workflows, making it easier than ever to conduct AI-powered analysis directly within your SQL queries. This means you can say goodbye to the hassle of complex API integrations and hello to a more streamlined approach to data analysis. This article explores how these new features could change the way you handle data.

Key Points

  • Databricks introduces AI SQL functions powered by foundation models.
  • These functions offer capabilities such as sentiment analysis, classification, text extraction, and grammar correction.
  • AI models are integrated into Databricks, removing the need for external API calls.
  • The functions are available on a pay-per-token basis, providing cost-effective AI solutions.
  • Availability is restricted to specific Databricks regions.
  • The AI extract function enables versatile information extraction.
  • The AI fix grammar function enhances the grammatical quality of text.

Databricks AI SQL Functions: Foundation Models in Action

Understanding the New Databricks AI SQL Functions

Databricks has rolled out a suite of AI SQL functions that bring AI directly into SQL queries, simplifying the process for data analysts and engineers. These functions tap into the power of foundation models, which are large language models trained on vast datasets. Typically, such models, like ChatGPT, are hosted externally and require complex API integrations. Databricks changes this by embedding these models right into their platform, making AI more accessible and efficient. Instead of each company building its own web service calls, Databricks offers off-the-shelf models, saving time and resources.

Databricks AI SQL Functions

While these functions make AI integration easier, it's important to consider the costs. They operate on a pay-per-token basis, so strategic implementation is key to manage expenses effectively. Also, these functions are not available in all Databricks regions yet, currently limited to regions like Central US, East US, East US 2, and North Central US. This might affect your workspace and project planning.

Core AI SQL Functions: Sentiment Analysis, Classification, and More

Databricks offers several core AI SQL functions that enrich data analysis:

  • AI Analyze Sentiment: Determine the sentiment (positive, negative, or neutral) in text, which is great for understanding customer feedback and social media trends.
  • AI Classify: Categorize text into predefined classes, such as sorting customer inquiries by topic or product.
  • AI Extract: Pull specific information, like names or email addresses, from unstructured text. This turns raw text into structured data, ideal for creating detailed models.
  • AI Extract Function

  • AI Fix Grammar: Correct grammar in text, useful for cleaning up user-generated content or ensuring professional communication.
  • AI Mask: Protect privacy by masking sensitive information in text, aiding compliance with data security regulations.
  • AI Summarize: Create concise summaries of long documents or articles, perfect for extracting key information quickly.
  • AI Translate: Translate text between languages, expanding your data analysis capabilities across different sources.
  • AI Similarity: Calculate similarity scores between records, allowing for more refined data analysis.

Navigating Databricks AI SQL Functions Using Databricks Foundation Model APIs

The following table lists the Databricks AI SQL functions powered by Databricks Foundation Model APIs:

FunctionDescription
ai_analyze_sentimentAnalyzes customer reviews using AI Functions
ai_classifyClassifies using AI Functions
ai_extractExtracts data using AI Functions
ai_fix_grammarFixes the grammar using AI Functions
ai_genUse ai gen function
ai_maskUse the ai mask function
ai_similarityUse ai similarity to calculate core
ai_summarizeUse the ai summarize function
ai_translateUse the ai Translate function
ai_queryThe AI_query() function allows you to serve your machine learning models and large language models using Databricks Model Serving and query them using SQL

Practical Applications: Real-World Use Cases

These AI SQL functions open up a range of practical applications:

  • Analyze Customer Reviews: Automatically assess the sentiment in customer reviews to pinpoint areas for improvement and gauge customer satisfaction.
  • Analyzing Customer Reviews

  • Automate Data Quality Checks: Use AI grammar correction to clean up data before analysis, including AI summarization for efficiency.
  • Streamline Document Processing: Extract key information from legal documents, contracts, or research papers, populating other datasets with extracted data like names and addresses.

By allowing AI functions to run directly in SQL, data workflows become significantly more streamlined.

Putting AI SQL Functions to the Test: A Demo in Databricks

Databricks offers a compelling demonstration of these functions in action:

AI SQL Functions Demo

  • Sentiment Analysis: With a simple SQL query, you can analyze text sentiment:
  • SELECT ai_analyze_sentiment('I am a happy sparky boi');
  • Data Cleaning: Query different data points to analyze customer reviews and perform various checks, making data cleaning more effective.
  • Using a common table expression (CTE) to store data, you can analyze different users' sentiments and perform various analyses.
  • Switching to AI fix grammar can help correct common grammatical issues.

Availability and Prerequisites for Using Foundation Models

To use Foundation Models effectively, certain requirements must be met:

Foundation Models Prerequisites

  • AI functions are only available on workspaces in Foundation Model APIs pay-per-token supported regions.
  • This function is not available on Azure Databricks SQL Classic.

Tips for Maximizing the Potential of Databricks AI SQL Functions

Strategic Integration

Plan carefully how to integrate these AI functions into your data pipelines. Identify where AI insights can add the most value and automate repetitive tasks. Use these functions where they will provide the most benefit.

Cost Optimization

Keep an eye on your token consumption to optimize costs. Assess current spending and explore other AI options to enhance functionality while evaluating the trade-off between AI-driven insights and costs.

Stay Updated

Databricks is continually improving its AI capabilities. Stay informed about new functions, region availability, and pricing changes to fully leverage this transformative technology. Keep learning and experimenting to enhance your workflows.

Advantages and Disadvantages of Databricks AI SQL Functions

Pros

  • Simplified AI integration within SQL workflows
  • Access to powerful foundation models
  • Reduced complexity compared to external API integrations
  • Potential for cost-effective AI solutions (pay-per-token)
  • Automated Data Quality Checks

Cons

  • Cost management (pay-per-token usage)
  • Limited region availability
  • Dependence on Databricks' platform
  • Potential vendor lock-in
  • Specific workspace and configuration requirements

Frequently Asked Questions

What are Databricks AI SQL functions?

Databricks AI SQL functions are a suite of tools that allow you to leverage AI models directly within your SQL queries. These functions are powered by foundation models and offer capabilities like sentiment analysis, text classification, and more.

What types of functions are AI extract and AI fix grammar?

The AI extract function enables term extraction and document parsing to pull out specific information like emails or names. The AI fix grammar function corrects grammatical errors in text.

How does pricing work for these AI functions?

Pricing is based on a pay-per-token model. Token usage depends on the complexity of the query and the size of the input text. For detailed pricing information, refer to the Databricks documentation.

In which regions are Databricks AI SQL functions available?

Currently, these functions are available in specific regions including Central US, East US, East US 2, and North Central US. Always check the latest Databricks documentation for the most current region support.

Related Questions

What are the alternatives to performing sentiment analysis in Databricks?

Before Databricks SQL functions, businesses had a few options. One was to build a model from scratch using their data to create a custom classification engine. Another was to use web service calls, which required setting up a separate subscription, potentially exposing the organization to data leaks or other concerns.

Related article
Microsoft Upgrades Copilot Notebooks With Task Delegation, Office Editing, and Interactive Reports Microsoft Upgrades Copilot Notebooks With Task Delegation, Office Editing, and Interactive Reports Microsoft is rolling out key updates to Copilot Notebooks, including task delegation, in-place Office document editing, and interactive reports. This shift transforms the tool from a simple AI organizer into a comprehensive smart workspace for execut
Meta, Broadcom and TSMC to Mass-Production Self-Developed AI Chip Iris in September Meta, Broadcom and TSMC to Mass-Production Self-Developed AI Chip Iris in September Meta is teaming up with Broadcom and TSMC to build a custom AI processor dubbed "Iris," targeting mass production by September 2026. As part of Meta's MTIA initiative, the chip has cleared initial testing in just six weeks. Designed to optimize ranki
Google AI Overviews Gain Ground in Search Results Google AI Overviews Gain Ground in Search Results According to Similarweb’s 2026 Generative AI Landscape report, Google’s AI-generated summaries appeared in 43% of US searches, a significant rise from 15% recorded a year prior.While AI Overviews present generated summaries within standard search res
Related Special Topic Recommendations
Design & Art Top AI Illustration Tools: Create Editorial Scenes and Cover Art Faster
Top AI Illustration Tools: Create Editorial Scenes and Cover Art Faster

2026 Latest Top-rated AI Illustration Tools: Our curated list features the best powerfully designed tools for creating stunning editorial scenes and eye-catching cover art quickly. Each option has gone through rigorous real-world tests, offering a free vs paid comparison to help you find the perfect match for your workflow. Try these must-try solutions today to unlock your AI edge and boost your creative productivity. Explore now at XIX.AI.

10 tools
xix.ai
Education and Learning Top AI Tutors for Exam Prep: Practice Math, Science, and English
Top AI Tutors for Exam Prep: Practice Math, Science, and English

2026 Latest Top-Rated Best AI Tutors for Exam Prep are here on XIX.AI! Our curated list features powerful game-changing tools that offer free vs paid comparison, real-world tests, and weekly updated rankings. They help boost your writing efficiency, simplify complex topic learning, and unlock your academic potential. Explore now to Discover your perfect exam prep tool and Start creating today to Unlock your AI edge!

10 tools
xix.ai
Finance AI Budget Planning Tools for Personal Money Management
AI Budget Planning Tools for Personal Money Management

2026 Latest Best Top-Rated AI Budget Planning Tools for Personal Money Management are here on XIX.AI! This curated collection features powerful, game-changing solutions that help you conduct real-world tests, understand spending habits, and create personalized plans to boost productivity. Enjoy a free vs paid comparison along with detailed rankings. Must-try tools designed to simplify money management and unlock your AI edge. Explore now!

11 tools
xix.ai
Health & Wellness AI Sleep Tracking Assistants: Improve Recovery with Better Bedtime Habits
AI Sleep Tracking Assistants: Improve Recovery with Better Bedtime Habits

2026 Latest Best Top-Rated AI Sleep Tracking Assistants curated for ultimate recovery. This fully updated weekly guide features powerful tools that deliver real-world tests, free vs paid comparison, and detailed rankings to help you find the must-try solution that boosts sleep quality and supports better bedtime habits. Explore now at XIX.AI to Unlock your AI edge.

10 tools
xix.ai
Data Analysis AI SQL Copilots for Product and Revenue Analytics
AI SQL Copilots for Product and Revenue Analytics

2026 Latest Best Top-Rated AI SQL Copilots for Product and Revenue Analytics! XIX.AI has curated a powerful, game-changing collection of must-try tools that undergo real-world tests through weekly updated rankings. These tools help users boost productivity significantly by accelerating data analysis, streamlining complex queries, and generating accurate insights to drive smarter business decisions. Explore now to Discover your perfect tool for unlocking your AI edge!

14 tools
xix.ai
Education and Learning Best AI Homework Helpers That Teach: Learn Concepts, Not Just Answers
Best AI Homework Helpers That Teach: Learn Concepts, Not Just Answers

2026 Latest Best Top-Rated AI Homework Helpers That Teach Core Concepts Not Just Answers Powerful Tools for Students Must-Try Curated List Weekly Updated Free vs Paid Comparison Real-World Tests Accurate Rankings to Help You Unlock Your Full Learning Potential Explore now to Discover your perfect tool for smarter studying.

10 tools
xix.ai
Comments (2)
0/500
WalterSanchez
WalterSanchez August 26, 2025 at 1:01:20 PM EDT

This AI SQL stuff from Databricks sounds like a game-changer! 😎 I’m curious how it stacks up against traditional analytics tools in terms of speed and accuracy.

StephenPerez
StephenPerez July 31, 2025 at 10:48:18 PM EDT

Wow, Databricks is really stepping up the game with AI SQL functions! 😎 It’s wild how you can just weave AI into SQL queries now. Makes me wonder if this’ll make data analysts’ jobs easier or if it’s just a shiny new toy for the big players.

OR