Example 2—Hadoop file server (gphdfs (Deprecated))

A newer version of this documentation is available. Click here to view the most up-to-date release of the Greenplum 5.x documentation.

Example 2—Hadoop file server (gphdfs (Deprecated))

=# CREATE WRITABLE EXTERNAL TABLE unload_expenses 
   ( LIKE expenses ) 
   LOCATION ('gphdfs://hdfslhost-1:8081/path') 
 FORMAT 'TEXT' (DELIMITER ',')
 DISTRIBUTED BY (exp_id);

You can only specify a directory for a writable external table with the gphdfs protocol. (You can only specify one file for a readable external table with the gphdfs protocol)

Note: The default port number is 9000.