When I try to execute gpload in greenplum, it gives met an error.
Input command :
[gpadmin@mdw ~]$ gpload -f test.yml
Error that I get
2017-02-25 11:19:13|ERROR|configuration file error: expected <block end>, but found '?', line 9
Config YAML file content:
VERSION: 1.0.0.1
DATABASE: gpadmin
USER: gpadmin
HOST: gpdbsne
PORT: 5432
GPLOAD:
INPUT:
- SOURCE:
LOCAL_HOSTNAME:
- gpdbsne
PORT: 8999
FILE:
- /home/gpadmin/testfile.txt
- FORMAT: text
- DELIMITER: '|'
- QUOTE: '"'
- COLUMNS:
- col1: text
- col2: text
- col3: text
- col4: text
- col5: text
OUTPUT:
- TABLE: public.test
- MODE: insert
- MAPPING:
col1: col1
col2: col2
Did I understand correctly that data structure is: INPUT - SOURCE - LOCAL_HOSTNAME ?
If so, add two spaces after SOURCE: Item.
-- Edited according to the comment.
yml config in presented format is highly dependant on tabulations.
So, working config might look as follows:
VERSION: 1.0.0.1
DATABASE: gpadmin
USER: gpadmin
HOST: gpdbsne
PORT: 5432
GPLOAD:
- INPUT:
- SOURCE:
LOCAL_HOSTNAME: gpdbsne
PORT: 8999
FILE: /home/gpadmin/testfile.txt
- FORMAT: text
- DELIMITER: '|'
- QUOTE: '"'
- COLUMNS:
- col1: text
- col2: text
- col3: text
- col4: text
- col5: text
- OUTPUT:
- TABLE: public.test
- MODE: insert
- MAPPING:
- col1: col1
- col2: col2