简体   繁体   English

greenplum gpload:配置YML文件错误

[英]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.

相关问题 Pivotal GreenPlum-talend的gpload问题 - Pivotal greenplum - gpload issue with talend 如何在prometheus yml 配置文件中配置特定IP? - How to configure a specific IP in prometheus yml configuration file? 如何在configuration.yml文件中配置电子邮件设置 - How to configure email settings in configuration.yml file 在 cpanel.yml 文件配置中部署的条件路径 - Conditional path to deploy in cpanel.yml file configuration 出现错误:将备份还原到5.x Greenplum DB时,无法识别的配置参数“ gp_strict_xml_parse” - Getting ERROR: unrecognized configuration parameter “gp_strict_xml_parse” while restoring backup to 5.x Greenplum DB 无法确定默认配置路径。 在 cloudflared Linux 中没有文件 [config.yml config.yaml] - Cannot determine default configuration path. No file [config.yml config.yaml] in cloudflared Linux tmux的配置文件错误 - Error in tmux's configuration file 将csv文件导入greenplum外部表时如何转义换行符? - how to escape newline when importing csv file into greenplum external table? 错误:在文件'./docker-compose.yml'中,服务必须是映射,而不是NoneType。如何解决这个问题 - ERROR: In file './docker-compose.yml', service must be a mapping, not a NoneType., how to solve this problem 如何从 csv 文件在greenplum的报价字段中使用逗号创建外部表? - how to create external table from csv file with commas in quote field in greenplum?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM