-- start_ignore
-- end_ignore
-- @description query01 test CSV with headers with wrong column names on the external table definition
--
-- start_matchsubs
--
-- # create a match/subs
--
-- m/\/gpdb\/v\d+\//
-- s/v\d+/SOME_VERSION/
--
-- m/file:.*;/
-- s/file:.*; lineNumber: \d+; columnNumber: \d+;/SOME_ERROR_LOCATION/g
--
-- m/Some headers in the query are missing from the file.*/
-- s/Some headers in the query are missing from the file.*/Some headers in the query are missing from the file. Please check the file and try again./
--
-- m/DETAIL/
-- s/DETAIL/CONTEXT/
--
-- m/pxf:\/\/(.*)\/pxf_automation_data/
-- s/pxf:\/\/.*\/pxf_automation_data.*PROFILE=s3:csv.*/pxf:\/\/pxf_automation_data\/s3select\/sample.csv?PROFILE=s3:csv&FILE_HEADER=USE&S3_SELECT=ON&server=s3/
--
-- m/CONTEXT:.*line.*/
-- s/line \d* of //g
--
-- end_matchsubs

SELECT * FROM s3select_csv_use_headers_with_wrong_col_names;
