<profile> <name>localfile:parquet</name> <description>A profile for reading and writing Parquet data from HDFS</description> <plugins> <fragmenter>org.greenplum.pxf.plugins.hdfs.HdfsDataFragmenter</fragmenter> <accessor>org.greenplum.pxf.plugins.hdfs.ParquetFileAccessor</accessor> <resolver>org.greenplum.pxf.plugins.hdfs.ParquetResolver</resolver> </plugins> <protocol>localfile</protocol> </profile> <profile> <name>localfile:csv</name> <description>This profile is suitable for using when reading delimited single line records from plain text CSV files on S3 </description> <plugins> <fragmenter>org.greenplum.pxf.plugins.hdfs.HdfsDataFragmenter</fragmenter> <accessor>org.greenplum.pxf.plugins.hdfs.LineBreakAccessor</accessor> <resolver>org.greenplum.pxf.plugins.hdfs.StringPassResolver</resolver> </plugins> <protocol>localfile</protocol> </profile> <profile> <name>localfile:text</name> <description>This profile is suitable for using when reading delimited single line records from plain text, tab-delimited, files on S3 </description> <plugins> <fragmenter>org.greenplum.pxf.plugins.hdfs.HdfsDataFragmenter</fragmenter> <accessor>org.greenplum.pxf.plugins.hdfs.LineBreakAccessor</accessor> <resolver>org.greenplum.pxf.plugins.hdfs.StringPassResolver</resolver> </plugins> <protocol>localfile</protocol> </profile>
ERROR: remote component error (500) from '127.0.0.1:5888': type Exception report message javax.servlet.ServletException: org.apache.hadoop.mapred.InvalidInputException: Input path does not exist: file:/tmp/core/Batting.csv description The server encountered an internal error that prevented it from fulfilling this request. exception javax.servlet.ServletException: javax.servlet.ServletException: org.apache.hadoop.mapred.InvalidInputException: Input path does not exist: file:/tmp/core/Batting.csv (libchurl.c:946) (seg0 slice1 192.168.99.101:30002 pid=8264) (cdbdisp.c:254) DETAIL: External table atting, file pxf:///tmp/core/Batting.csv?PROFILE=localfile:csv
CREATE EXTERNAL TABLE atting (playerID varchar(200),yearID varchar(200),stint varchar(200),teamID varchar(200),lgID varchar(200),G varchar(200),AB varchar(200),R varchar(200),H varchar(200), Doubles varchar(200),Triples varchar(200),HR varchar(200),RBI varchar(200),SB varchar(200),CS varchar(200),BB varchar(200),SO varchar(200),IBB varchar(200),HBP varchar(200),SH varchar(200),SF varchar(200),GIDP varchar(200)) LOCATION ('pxf:///tmp/core/Batting.csv?PROFILE=localfile:csv') FORMAT 'CSV';
Now you are ready to select * from your file.