greenplum gpload : 配置 YML 文件错误
greenplum gpload : configuration YML file error
当我尝试在 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
配置 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
我是否理解正确,数据结构是:INPUT - SOURCE - LOCAL_HOSTNAME?
如果是,在 SOURCE: Item.
后面加两个空格
-- 根据评论编辑。
呈现格式的 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
当我尝试在 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
配置 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
我是否理解正确,数据结构是:INPUT - SOURCE - LOCAL_HOSTNAME?
如果是,在 SOURCE: Item.
后面加两个空格
-- 根据评论编辑。
呈现格式的 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