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

Overview

The PostgreSQL gateway lets you use familiar SQL tools and clients instead of calling REST APIs. You connect to a PostgreSQL-compatible endpoint and work with tables that represent 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: Map to nodes and edges in your data model views.
  • Time series: Map to time series data points and metadata.
  • RAW tables: Map to rows in CDF RAW.

Querying tables

After you create a table, you can run a simple filtered read to verify ingested data. The gateway translates SQL into CDF API calls. Filters that the CDF API supports are pushed down. Joins, aggregations, and ORDER BY on fields the CDF API doesn’t support sorting on aren’t pushed down and can trigger a full table scan. Don’t connect business intelligence tools to the gateway. See Limitations.
Last modified on September 18, 2026