[英]greenplum gpload : configuration YML file error
When I try to execute gpload in greenplum, it gives met an error. 当我尝试在greenplum中执行gpload时,遇到错误。
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: 配置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
Did I understand correctly that data structure is: INPUT - SOURCE - LOCAL_HOSTNAME ? 我是否正确理解数据结构是:INPUT-SOURCE-LOCAL_HOSTNAME?
If so, add two spaces after SOURCE: Item. 如果是这样,请在SOURCE:Item之后添加两个空格。
-- Edited according to the comment. -根据评论进行编辑。
yml config in presented format is highly dependant on tabulations. 呈现格式的yml config高度依赖于表格。
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
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.