Header option is ignored in external table because of old gpfdist distribution
search cancel

Header option is ignored in external table because of old gpfdist distribution

book

Article ID: 296639

calendar_today

Updated On:

Products

VMware Tanzu Greenplum

Issue/Introduction

While on VMware Tanzu Greenplum 6.12.1, you are testing external table access and the external table was created with the header option:
DROP EXTERNAL TABLE IF EXISTS support.myexternaltable ;
CREATE EXTERNAL TABLE support.myexternaltable
(

    Filename character varying(32),
    CatType integer,
    Data character varying(120)
)

LOCATION ('gpfdist://etl:8080/withHeader.csv')
FORMAT 'csv' (header delimiter ',' null '' escape '"' quote '"')
ENCODING 'UTF8';

select * from support.myexternaltable limit 10;

When selecting from a table, you receive the following error: 
ERROR: invalid input syntax for integer: "CatType" (seg3 slice1 172.1.1.1:1173 pid=577818)

From this error we can see a "CatType" is also the name of the second column.

Environment

Product Version: 6.12

Resolution

This issue is caused by an out-of-date gpfdist distribution on the ETL server that was serving files. To resolve this issue, make sure you are using the correct gpfdist distribution version. In this case, one the Greenplum 6.12 gpfdist version was used, everything worked as expected.