当我尝试在greenplum中执行gpload时,它给出了一个错误。
输入命令:
[gpadmin@mdw ~]$ gpload -f test.yml
我得到的错误
2017-02-25 11:19:13|ERROR|configuration file error: expected <block end>, but found '?', line 9
config yaml文件内容:
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
我是否正确理解了数据结构是:输入 - 源-local_hostname?
如果是这样,请添加两个空间来源:项目。
- 根据评论进行编辑。
以呈现格式的YML配置高度依赖于表格。
因此,工作配置可能如下:
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