Skip to content

SingleStoreDB Python UDFs: Bringing the AI and ML Capability Closer To Data #358

@psachdeva-ss

Description

@psachdeva-ss

Talk title

SingleStoreDB Python UDFs: Bringing the AI and ML Capability Closer To Data

Short talk description

This talk covers Python UDFs in SingleStoreDB:

How to write Python functions that can be called directly within the SQL queries. We'll look at the sandboxed execution environment, scalar vs vectorized UDFs for performance, and practical examples.

Use cases include running model inference, text processing, and generating vector embeddings without moving data out of the database.

Essentially, how to run Python code where your data lives.

Long talk description

If you've worked with databases, you know SQL is great for querying data but limited when you need custom logic: complex calculations, text processing, or machine learning. That's where User-Defined Functions (UDFs) come in: they let you extend what your database can do by writing custom functions in languages like Python.

This talk introduces Python UDFs in SingleStoreDB and walks through how they work. We'll start with the basics: what UDFs are, why they matter, and how they bring Python's AI and ML capabilities directly into the database. You'll see how to write functions that process data row-by-row (scalars) versus in batches (vectors), and understand when each approach makes sense for performance.

We'll cover Table Valued Functions (TVFs) that return tables instead of single values, letting you use them in FROM clauses. You'll learn how data types work between SQL and Python, and see practical examples like transforming JSON, running ML models, and processing text.

You'll also learn about the sandboxed execution environment that keeps things secure, and how to go from testing in notebooks to deploying functions for production use.

By the end, you'll understand how modern databases can run Python code, why this matters for building data applications, and how to get started with your own Python UDFs in SingleStoreDB.

What format do you have in mind?

Sponsored talk (20-25 minutes, sponsored by a company or organization as part of a potential partnership or sponsorship arrangement via venue sharing, food and beverages, or other amenities for the event)

Talk outline / Agenda

  1. Introduction: What are UDFs and why extend databases with Python?
  2. Bringing AI/ML Capabilities to the Engine
  3. Scalars vs Vectors: row-by-row vs batch processing
  4. Table Valued Functions (TVFs)
  5. Supported Types and Transformer Functions
  6. Transforming and Ingesting Data
  7. Deployment and Execution: Notebooks to production
  8. Performance and Scaling
  9. Q&A

Key takeaways

  1. Extending databases with custom code beyond SQL
  2. Row-level vs batch processing performance trade-offs
  3. Sandboxing and security for user code execution

What domain would you say your talk falls under?

Other/Miscellaneous

Duration (including Q&A)

30 minutes

Prerequisites and preparation

  • Basic Python knowledge (functions, data types)
  • Basic SQL familiarity (SELECT, FROM, WHERE)

Resources and references

Introducing Python UDFs in SingleStoreDB (blog)
Python UDF Docs
SingleStoreDB Python SDK

Link to slides/demos (if available)

No response

Twitter/X handle (optional)

@prabhatexit0

LinkedIn profile (optional)

No response

Profile picture URL (optional)

No response

Speaker bio

Software Engineer @ SingleStoreDB

Availability

08/11/2025

Accessibility & special requirements

AV Setup

Speaker checklist

  • I have read and understood the PyDelhi guidelines for submitting proposals and giving talks
  • I will make my talk accessible to all attendees and will proactively ask for any accommodations or special requirements I might need
  • I agree to share slides, code snippets, and other materials used during the talk with the community
  • I will follow PyDelhi's Code of Conduct and maintain a welcoming, inclusive environment throughout my participation
  • I understand that PyDelhi meetups are community-centric events focused on learning, knowledge sharing, and networking, and I will respect this ethos by not using this platform for self-promotion or hiring pitches during my presentation, unless explicitly invited to do so by means of a sponsorship or similar arrangement
  • If the talk is recorded by the PyDelhi team, I grant permission to release the video on PyDelhi's YouTube channel under the CC-BY-4.0 license, or a different license of my choosing if I am specifying it in my proposal or with the materials I share

Additional comments

No response

Metadata

Metadata

Labels

acceptedCongratulations, your talk has been accepted!awaiting response from authorThis proposal needs a response from the author in order for a decision to be made on its schedulingproposalWish to present at PyDelhi? This label gets added when the "Talk Proposal" option is chosen.scheduledThis talk/workshop is scheduled for the next meetup, either for the same month or the coming one

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions