greenplum数据入库,采用的书文件入表,可支持文件类型为txt或者csv文件。

文件入库需要先启动后台服务

[smp@rh1 tmp]$ nohup gpfdist -d /tmp/ -p 8081 -l gpfdist.log&

  

[smp@rh1 tmp]$ ll /tmp/*.csv

-rw-rw-r-- 1 smp smp 1167 Mar 11 02:35 /tmp/1.csv

 

然后使用一下命令入库:

create external table z7_wang(like wang)
location('gpfdist://172.16.40.71:8081/1.csv')
format 'csv'(header delimiter ',' fill missing fields) encoding 'utf8'
log errors into err_ext_r_wang  segment reject limit 100 percent

  greenplum(三)之数据入库

相关文章:

  • 2021-12-10
  • 2022-12-23
  • 2022-01-26
  • 2021-12-08
  • 2021-12-18
  • 2021-05-08
  • 2021-08-21
  • 2021-06-22
猜你喜欢
  • 2022-12-23
  • 2021-09-28
  • 2021-11-17
  • 2021-04-03
  • 2021-04-10
  • 2021-06-13
  • 2021-12-06
相关资源
相似解决方案