Skip to main content
PostgreSQL gateway tables expose CDF data as virtual tables that you can query using standard SQL through the PostgreSQL protocol. You can create tables that map to CDF resources like data models, time series, or raw tables. Each table is scoped to a specific gateway user.

Overview

The Postgres Gateway lets you use familiar SQL tools and clients to read CDF data. Instead of calling REST APIs, you connect to a PostgreSQL-compatible endpoint and run queries against tables that represent your CDF resources.

Creating tables

You create gateway tables by defining mappings from CDF resources to virtual table schemas. Each table specifies which CDF resource (such as a data model view, time series, or raw table) it exposes and how the columns map to that resource’s fields.
Tables are scoped to a specific gateway user. When you create a table, it is associated with the user you authenticate as.

Supported resources

Gateway tables can map to several CDF resource types:
  • Data models – Query nodes and edges from your data model views
  • Time series – Access time series data points and metadata
  • Raw tables – Query raw table rows stored in CDF

Querying tables

Once a table is created, you can query it using standard SQL. The gateway handles translation between SQL and CDF API calls, so you can use JOINs, filters, and aggregations as long as they map to supported CDF operations.
Last modified on April 23, 2026