Skip to main content

Peliqan

6. Query multiple data sources with SQL (federated queries)

Recent videos

Peliqan data platform

All-in-one Data Platform

Built-in data warehouse, superior data activation capabilities, and AI-powered development assistance.

Some of your data is in the warehouse and some is only in a database you never replicated. Peliqan has a built-in federated query engine, so one SQL query can read across both. This tutorial shows how to run one and what to watch for.

How to run a federated query

  1. 1Start from a normal query. A regular Peliqan query combines sources that are already in the data warehouse – Pipedrive and Odoo, for example – and runs on the warehouse itself.
  2. 2Add the source that is not replicated. In the demo a SQL Server is connected to Peliqan but never synced, so some tables exist only there. The federated query engine lets a single query span both systems.
  3. 3Enable Run Query on Trino engine. Turn the option on for that query and it executes across the systems. The example joins Pipedrive organizations from the warehouse with a Customers table in the SQL Server dbo schema.
  4. 4Use fully qualified names when names collide. Short table names usually resolve. If several tables share a name, open the table, choose Show details and use the fully qualified Trino table name.
  5. 5Check what ran. Under Trino queries you can see the queries that executed and how long they took. In the left pane a T icon marks the queries that run on Trino.

What you can do with federated queries

  • Join warehouse tables with tables in an external database in one SQL query
  • Leave data where it lives instead of replicating it just to be able to query it
  • Reference other Trino queries to build up federated models in steps
  • See running federated queries and their timings under Trino queries

About the engine

The federated engine is Trino, also known as Presto, and it is built into the Peliqan platform – nothing to install or run. One rule to remember: you cannot mix normal and Trino queries. When a Trino query references another query, that query also needs Run Query on Trino enabled.

Data spread across systems? Get started with Peliqan.

FAQs

A federated query engine runs SQL queries across multiple separate data sources – like databases, APIs, and SaaS apps – as if they were one. You can join data from different systems without moving it first.

Peliqan uses Trino under the hood as its federated query engine. You can write standard SQL to query data from databases, APIs, and SaaS applications in a single query.

Yes. With Peliqan, you can write a SQL query that joins data from your CRM, ERP, database, and SaaS apps – even if they live on different systems.

No. The federated query engine lets you query data in place. You can also materialize results into the warehouse if you want faster performance.

Get instant access to all your company data

Connect 300+ sources, serve any BI tool, and give every AI agent one governed endpoint to read, and write back where the app supports it.