option
Home
News
Databricks Unleashes AI SQL Functions with Foundation Models

Databricks Unleashes AI SQL Functions with Foundation Models

May 21, 2025
204

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
Musk Considered Leaving OpenAI to His Kids as Altman Testifies Musk Considered Leaving OpenAI to His Kids as Altman Testifies This morning, OpenAI CEO Sam Altman took the stand to address former co-founder Elon Musk’s lawsuit challenging the company’s corporate structure.When asked about Musk’s claim that other founders “stole a charity” by launching a for-profit subsidiary
Sam Altman Sparks Debate Over AI's Deceleration Sam Altman Sparks Debate Over AI's Deceleration Listen onApple PodcastsListen onSpotifyOpenAI CEO Sam Altman recently suggested that it may be time to “pace the rate of AI development” to allow society to “harden around some of these new capability levels.”On the latest episode of TechCrunch’s Equ
Anthropic Opens Doors to EU Cybersecurity Agency as Mythos5 Model Faces Compliance Exam Anthropic Opens Doors to EU Cybersecurity Agency as Mythos5 Model Faces Compliance Exam Artificial intelligence compliance regulations are advancing significantly. Leading AI firm Anthropic has officially granted the European Union's cybersecurity authority access to its Mythos AI model, a pivotal move for this advanced large language m
Related Special Topic Recommendations
Prompt Best AI Prompt Libraries for ChatGPT Workflows
Best AI Prompt Libraries for ChatGPT Workflows

2026 Latest Best Top-Rated AI Prompt Libraries for optimizing all types of ChatGPT workflows. XIX.AI has curated a powerful, game-changing collection that goes through rigorous real-world tests to ensure top performance. You can find detailed free vs paid comparisons and expert rankings to help you choose the must-try tools that boost your productivity and unlock your AI edge. Explore now!

11 tools
xix.ai
Education and Learning AI Quiz Builder Platforms for Teachers, Tutors, and Cohort-Based Learning Programs
AI Quiz Builder Platforms for Teachers, Tutors, and Cohort-Based Learning Programs

2026 Latest Best AI Quiz Builder Platforms for Teachers, Tutors, and Cohort-Based Learning Programs! XIX.AI has curated a top-rated list of powerful game-changing tools that go through real-world tests to deliver accurate rankings. These must-try platforms help boost writing efficiency, streamline content creation, and simplify quiz design across all learning scenarios. Explore now to discover your perfect tool for unlocking your AI edge in teaching!

13 tools
xix.ai
code AI Pull Request Review Tools for GitHub Teams Handling Refactors, Bugs, and Security Gaps
AI Pull Request Review Tools for GitHub Teams Handling Refactors, Bugs, and Security Gaps

2026 Latest Best AI Pull Request Review Tools for GitHub Teams are here on XIX.AI! This top-rated curated list showcases powerful game-changing solutions that streamline refactoring, bug fixing, and security gap detection across all team workflows. Enjoy a free vs paid comparison along with real-world tests and detailed rankings to help you find the perfect tool that boosts productivity significantly. Explore now to unlock your AI edge!

12 tools
xix.ai
Text-to-speech Best AI Text to Speech Tools for Natural Voiceovers
Best AI Text to Speech Tools for Natural Voiceovers

2026 Latest Best Top-rated AI Text to Speech Tools for Natural Voiceovers are here on XIX.AI! This curated list features powerful, game-changing options that deliver crystal-clear voices for every use case, backed by real-world tests and weekly updated rankings. Get a free vs paid comparison to find the must-try solution that boosts your productivity instantly. Explore now to Unlock your AI edge!

11 tools
xix.ai
Comic Creation Manga AI Background Generators for Serialized Chapters, Covers, and Promo Art
Manga AI Background Generators for Serialized Chapters, Covers, and Promo Art

2026 Latest Best Manga AI Background Generators Ranked Top-Rated! This curated collection showcases powerful game-changing tools perfect for creating high-quality chapter backgrounds, book covers, and promotional art. Every option has undergone rigorous real-world tests to ensure reliability. Get a free vs paid comparison along with detailed insights. Explore now to discover your perfect tool and unlock your AI edge in manga creation.

6 tools
xix.ai
Image editing AI Object Removal Editors: Clean Up Portraits, Travel, and Product Shots
AI Object Removal Editors: Clean Up Portraits, Travel, and Product Shots

2026 Latest Best Top-rated AI Object Removal Editors for portraits travel product shots! XIX.AI curates a powerful game-changing collection regularly updated with weekly rankings. These tools offer real-world tests to help you quickly remove unwanted elements, boost content quality, and save tons of time without compromising results. Must-try for anyone aiming to unlock their AI creation edge. Explore now!

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