Example 5—TEXT Format on a Hadoop Distributed File Server

Creates a readable external table, ext_expenses, using the pxf protocol. The column delimiter is a pipe ( | ).

  1. =# CREATE EXTERNAL TABLE ext_expenses ( name text,
  2. date date, amount float4, category text, desc1 text )
  3. LOCATION ('pxf://dir/data/filename.txt?PROFILE=hdfs:text')
  4. FORMAT 'TEXT' (DELIMITER '|');

Refer to Accessing External Data with PXF for information about using the Greenplum Platform Extension Framework (PXF) to access data on a Hadoop Distributed File System.

Parent topic: Examples for Creating External Tables