AWS Glue Foreign Table

AWS Glue functions as a metadata management service utilizing a data lake. Tacnode can connect to Glue’s metadata through external tables, enabling faster queries and efficient data import.

Install the Extension

Install the extension once. If it has already been installed, you can skip this step.

CREATE EXTENSION glue_fdw;

Create a Glue Foreign Server

CREATE SERVER <server_name> FOREIGN DATA WRAPPER glue_fdw
OPTIONS (
 REGION 'region-id'
);
  • REGION: The region ID of the cloud storage service. For specific IDs, see AWS S3 Endpoint.
-- Example
CREATE SERVER glue_server FOREIGN DATA WRAPPER glue_fdw
OPTIONS (
 REGION 'us-east-1'
);

Create a User Mapping

Use 'access_id' and 'access_key' to grant the local user account access rights to the designated object storage.

CREATE USER MAPPING for public SERVER glue_server
OPTIONS (
 ACCESS_ID 'access-id',
 ACCESS_KEY 'access-key'
);

Import Foreign Tables

-- Create the external table t1 under glue_db, storing metadata in the public schema.
IMPORT FOREIGN SCHEMA glue_db LIMIT TO(t1) FROM SERVER glue_server INTO public;

On this page