I am attempting to load data from a *.csv file off my VM of the Greenplum Community edition; however, I am having issues creating the external table.

CREATE EXTERNAL 
    TABLE flightinfo (flightid int, airline_id int, carrier character(2), fl_num int)
    LOCATION ('gpfdist://home/gpadmin/Desktop/flighttable.csv') FORMAT 'CSV';

This keeps giving an error where it is unable to translate the host name...I've tried with localhost and others, but still nothing appears to be working.

有帮助吗?

解决方案

External table declarations need the name of the host, the port your gpfdist instance is listening on, and the filename.

If you have gpfdist running on port 8000 in directory /localhome/gpadmin/Desktop:

CREATE EXTERNAL 
TABLE flightinfo (flightid int, airline_id int, carrier character(2), fl_num int)
LOCATION ('gpfdist://localhost:8000/flighttable.csv') FORMAT 'CSV';
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top