
2024/12/12 - Adithya Krishnan
LLM-driven data pipelines with prompt() in MotherDuck and dbt
Leveraging LLM workflow in your data pipelines
If you’re building web apps—whether frontend or backend—you’re probably fine using Postgres or another transactional database for most use cases. But as soon as your app needs data-intensive features, like an analytics dashboard for users or insights on product usage, things can slow down. That’s because transactional databases aren’t built for complex analytical queries.
In the past, you would often hand this off to a separate team with a specialized setup, but today, infrastructure is more straightforward, and SQL has become the go-to tool for analytics.
In this blog, we’ll quickly cover what analytical databases are, when to use them, how to move data from your OLTP database, and a practical examples of using an OLAP cloud service like MotherDuck, directly in your Vercel application.
If you prefer watching over reading :
Analytical databases, or OLAP (Online Analytical Processing) databases, are designed for querying and analyzing large datasets. Unlike transactional databases like Postgres, which is excellent at handling fast, small-scale operations like creating or updating records, OLAP databases are optimized for heavy, read-intensive operations.

They’re built for complex queries, like calculating averages across millions of rows, filtering data by multiple criteria, or aggregating metrics over time. They’re also much faster at these operations because they store and process data differently, typically using columnar storage.

In short, OLAP databases are ideal for scenarios where you need to crunch large datasets to find trends, patterns, or insights.
First, it’s important to note that it’s perfectly fine to start prototyping your analytics use cases on your current transactional database, like Postgres. Many analytical projects begin like that, especially for smaller datasets or simple reporting.
However, as your app grows and the complexity or volume of data increases, you’ll likely hit performance bottlenecks. That's a clear sign you are outgrowing Postgres for analytics, as you don't want these analytical queries consuming your entire database's resources. This doesn't mean replacing your existing systems; instead, many teams adopt a two-tier architecture with a lean, modern data warehouse that acts as a high-performance serving layer for live applications.

Here are some common scenarios for analytical databases:
These are not exclusive use cases but the most common ones you might see.
There are three common methods.
ETL stands for Extract, Transform, Load. This is a common approach to move data. You extract it from your OLTP database, clean or reformat it, and load it into your OLAP database. You typically have a process (in Python or whataever have you), that would move the data. There are two classic approaches:
If you need live updates for dashboards or analytics, you can use real-time streaming tools like Kafka or AWS Kinesis to move data continuously. These event streaming services often integrate with Change Data Capture (CDC) tools to track and stream changes in real time. They are excellent for capturing incremental updates and syncing them efficiently into your OLAP database.
Some OLAP systems allow direct queries on your transactional database without moving data or relying on another process.
For example:
Each method depends on your app’s needs. Real-time streaming is ideal for live dashboards, ETL is great for batch analytics, and direct querying works well for smaller-scale use cases, as it's really easy to get started.
Let’s dive into an example of connecting your web application to an OLAP database in your data stack using Vercel and its native integration with MotherDuck, which runs DuckDB in the cloud.
In this use case, we’ll hydrate analytical data stored in MotherDuck to feed directly into your application.
With the native integration, you can create a MotherDuck account without ever leaving Vercel, streamlining the process with a single platform for both setup and billing.
Simply head to the template listing, where you can easily deploy a ready-made template with just a few clicks or install the integration into an existing project.
In this demo, we’re showcasing a Vercel data dashboard—and as you’ll notice, it’s incredibly fast and responsive.
Here’s why:
The result? It provides a smoother experience for users and lower computing costs for developers.
To wrap up, analytical databases unlock a world of possibilities for web developers. They help you handle data-intensive features like user dashboards, gain deeper insights into your product, and combine data from multiple sources—all without overloading your transactional database.
With modern tools and SQL as a common language, setting up these workflows has never been easier. So, the next time your OLTP database is struggling, think about OLAP. If you want to push application speed even further, learn how DuckDB Wasm brings analytical SQL directly to the browser.
Start using MotherDuck for free today, and explore our documentation on the Vercel integration!
Keep quacking and keep coding.

2024/12/12 - Adithya Krishnan
Leveraging LLM workflow in your data pipelines

2024/12/17 - Jordan Tigani, Boaz Leskes
Why separate storage and compute in DuckDB, how we do it in MotherDuck to enable sharing and future work.