gpload是EMC在greenplum中提供的用来进行数据装载的工具。我们既可以在服务端访问它,也可以把它拷贝到远程的ETL服务器,进行远程数据加载。经验不足的人在使用的时候,难免会出现一些问题,现在将这些问题汇总如下:
问题1.环境准备
1.提示内容:-bash: gpload: command not found
错误原因:greenplum的环境没有source
修改方法:source /usr/local/greenplum-db/greenplum_path.sh
2.提示内容:未知
错误原因:你使用的服务器上需要安装gpfdist程序
改正方法:装gpfdist程序,并把它设置到环境变量PATH中(可以从数据库服务器端的安装目录的子目录bin中拷贝该工具)
问题2.格式问题
问题3.参数设置问题
database 错误:database "tita" does not exist
user和password错误:password authentication failed for user "cs"
host配置错误:could not connect to database: could not translate host name "m153" to address: Name or service not known
port配置错误:could not connect to server: Connection refused Is the server running on host "m150" (192.168.10.150) and accepting TCP/IP connections on port 54321?. Is the Greenplum Database running on port 54321?
这类错误根据提示,基本上可以迅速判断,不再11列举。
3.编码问题
。。。
4.每行的数据太长
。。。
5.类型不匹配
。。。。