gpload 将txt或csv数据加载到 Greenplum
1、配置YAML文件(gpload_test.yaml)
VERSION: 1.0.0.1
DATABASE: gpkafka_test
USER: root
PASSWORD: 123456
HOST: 10.10.14.206
PORT: 5432
GPLOAD:
INPUT:
- SOURCE:
FILE:
- /usr/local/gpadmin/1.txt
- COLUMNS: #txt中每列的顺序
- dsid: text
- dsname: text
- FORMAT: text
- DELIMITER: ','
- ERROR_LIMIT: 25
- LOG_ERRORS: true
OUTPUT:
- TABLE: public.gpload_test
- MODE: INSERT
PRELOAD:
- REUSE_TABLES: true
1.txt内容
1,a
2,b
3,c
表结构
2、启动gpload
gpload -f gpload_test.yaml -l ./gpload.log