首页 > 数据库 > 国内数据库 > GBase 8a数据库本地加载语句介绍

南大通用GBase 8a数据库本地加载语句语法如下:load data infile ‘file:///opt/test_data/t.txt’ into table t fields terminated by ‘|’;
load data infile ‘file://${ip_host}/opt/test_data/t.txt’ into table t fields terminated by ‘|’;(指定ip)
本地加载需要特别注意:
(1)若使用第一种本地加载语句方式,需要所有集群节点具备/opt/test_load/t1.txt数据文件(数据文件的存放路径必须相同),若某一节点不存在该路径的数据文件,加载时会有如下报错:filed with error - No such file or directory。
(2)若使用第二种本地加载指定ip语句方式,则只需要指定ip节点下存在/opt/test_load/t1.txt数据文件即可。
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/69979120/viewspace-3099957/ ,如需转载,请注明出处,否则将追究法律责任。