Oracle导出数据迁移到gbase:text parser error
1.源表23个字段,使用不可见字符,进行字段分隔,换行分隔,命令如下:
load data infile 'ftp://gbase:password0@ip//gbase/oraToGbase/dev_data/DND_DISCOUNT.txt' into table dbname.table_name data_format 3 null_value 'NULL' fields terminated by '\x02' lines terminated by '\x03'
datetime format '%Y-%m-%d %H:%i:%s' date format '%Y-%m-%d';
在进行数据加载时,如果报错:text parser error 很可能字段之间存在特殊字符,还需要修改分隔符

修改后的导出命令:
/gbase/oraToGbase/tool/orato8a-9.5.3.046-centos8-x86_64 --user='user_name/"password"@ip:1521/server_name' --query="select * from db.table_name" --file='/gbase/oraToGbase/dev_data/table_name.txt' --null_value 'NULL' --field="\xff" --line_separator="xff\xff" --format=3
加载如下:
load data infile 'ftp://gbase:password@ip//gbase/oraToGbase/dev_data/table_name.txt' into table db.table_name data_format 3 null_value 'NULL' fields terminated by '\xff' lines terminated by 'xff\xff'
datetime format '%Y-%m-%d %H:%i:%s' date format '%Y-%m-%d';
评论
热门帖子
- 12025-12-01浏览数:182759
- 22023-05-09浏览数:25044
- 42023-09-25浏览数:18519
- 52020-05-11浏览数:17526