All Products
Search
Document Center

AnalyticDB for PostgreSQL:Overview of OSS foreign tables

Last Updated:Apr 22, 2024

Object Storage Service foreign data wrapper (OSS FDW) is developed based on the PostgreSQL FDW framework to access OSS data for analysis. OSS FDW allows you to import OSS data to AnalyticDB for PostgreSQL and supports partitioned tables. OSS foreign tables are superior to OSS external tables in terms of performance, functionality, and stability.

Overview

The following table describes the operations that you can perform by using OSS foreign tables.

Operation

Description

Query and analyze OSS data

You can use AnalyticDB for PostgreSQL to query the data of OSS foreign tables and join OSS foreign tables with AnalyticDB for PostgreSQL tables for data analysis.

You can query the data of OSS foreign tables in the same manner as you query AnalyticDB for PostgreSQL table data.

Join OSS foreign tables with AnalyticDB for PostgreSQL tables for data analysis

Import OSS data to an AnalyticDB for PostgreSQL table

You can use an OSS foreign table to import OSS data to an AnalyticDB for PostgreSQL instance.

Use OSS foreign tables to export data

You can use an OSS foreign table to export data from an AnalyticDB for PostgreSQL instance to OSS.

Use partitioned OSS foreign tables

The table partitioning feature is supported for OSS foreign tables. If the WHERE clause of a query statement contains a partition column, you can improve query efficiency by scanning less data from OSS.

Comparison between OSS foreign tables and OSS external tables

OSS foreign tables are superior to OSS external tables in terms of performance, functionality, and stability. The following table compares the two types of tables.

Feature

OSS foreign table

OSS external table

Data import from OSS or export to OSS

Supported.

Supported.

Analysis of large amounts of data

Provides better performance than OSS external tables.

May fail to meet the expected performance requirements.

Supported object formats

Supports the following object formats:

  • AVRO

  • ORC

  • PARQUET

  • JSON (GZIP-compressed)

  • JSON Lines (GZIP-compressed)

  • CSV (GZIP- and standard Snappy-compressed)

  • TEXT (GZIP- and standard Snappy-compressed)

Supports the following object formats:

  • CSV (GZIP- and standard Snappy-compressed)

  • TEXT (GZIP- and standard Snappy-compressed)

Partitioned tables

Supported.

Not supported.

References