如何对只有一列且“n”的文件执行快速加载行?
我已经对具有多个列的表进行了快速加载(我使用 vartext 格式以 ,
作为分隔符进行了此操作)。
现在我想加载一个只有一列(还有 5 行)的文件。但我无法做到这一点并遇到以下错误:
I/O Error on File Read: 16, Text: Unexpected data format
我的快速加载脚本如下:
SESSIONS 5;
.LOGON dbc/dbc.dbc;
BEGIN LOADING MYTABLE
ERRORFILES
TABLE_FLET,
TABLE_FLUV ;
DEFINE
COL1_MYTABLE (CHAR(2))
FILE = C:\Fload\INPT.TXT;
INSERT INTO MYTABLE
(
COL1_MYTABLE
)
VALUES
(
:COL1_MYTABLE
);
END LOADING;
MyTable 结构如下:
CREATE MULTISET TABLE database.MYTABLE ,NO FALLBACK ,
NO BEFORE JOURNAL,
NO AFTER JOURNAL,
CHECKSUM = DEFAULT
(
COL1_MYTABLE CHAR(2) CHARACTER SET LATIN NOT CASESPECIFIC
)
PRIMARY INDEX ( COL1_MYTABLE );
输入文件的内容如下:
AA
BB
CC
DD
EE
我怎样才能进行此快速加载?
I have done fastload for table which has more than one column (I did this with vartext format with ,
as delimiter).
Now I want to load a file which has only one column (and 5 rows to say). But I'm unable to do that and encountering the below error:
I/O Error on File Read: 16, Text: Unexpected data format
My fastload script is as below:
SESSIONS 5;
.LOGON dbc/dbc.dbc;
BEGIN LOADING MYTABLE
ERRORFILES
TABLE_FLET,
TABLE_FLUV ;
DEFINE
COL1_MYTABLE (CHAR(2))
FILE = C:\Fload\INPT.TXT;
INSERT INTO MYTABLE
(
COL1_MYTABLE
)
VALUES
(
:COL1_MYTABLE
);
END LOADING;
MyTable structure is as below:
CREATE MULTISET TABLE database.MYTABLE ,NO FALLBACK ,
NO BEFORE JOURNAL,
NO AFTER JOURNAL,
CHECKSUM = DEFAULT
(
COL1_MYTABLE CHAR(2) CHARACTER SET LATIN NOT CASESPECIFIC
)
PRIMARY INDEX ( COL1_MYTABLE );
the contents of the input file is as below:
AA
BB
CC
DD
EE
How can I do this fastload?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
完成..使用以下脚本:
Done.. with the below script :