我正在将包含大约 250 亿行的数据集加载到我们的一个数据库中。有了这么多数据,我不想加载不需要的行,所以我在加载中添加了 WHERE 子句。数据由多行 XYZ 值组成,当 Z = -9999 时,表示该点未定义,可以省略。
添加WHERE Z <> -9999会出现此错误...
SQL*Loader-350: Syntax error at line 5.
Expecting quoted string or hex identifier, found "-".
WHEN Z <> -9999
没有 WHERE 子句它运行良好
数据:
44790.301538192,54665.413037326,-9999
44791.301474866,54665.387827518,-9999
44792.30141154,54665.36261771,-9999
44793.301348214,54665.337407902,-9999
目标表:
CREATE TABLE LIDAR_DSM_XYZ_1M
(
PK_ID INTEGER,
TILE VARCHAR2(30 BYTE),
GEOMETRY MDSYS.SDO_GEOMETRY
)
控制文件:
OPTIONS(DIRECT=TRUE)
UNRECOVERABLE LOAD DATA
INFILE 'su9498_dsm_1m.xyz'
APPEND
INTO TABLE LIDAR_DSM_XYZ_1M
WHEN Z <> -9999
FIELDS TERMINATED BY ','
TRAILING NULLCOLS (
TILE CONSTANT 'su9498_dsm_1m',
GEOMETRY COLUMN OBJECT
(SDO_GTYPE CONSTANT 3001,
SDO_POINT COLUMN OBJECT
(X FLOAT EXTERNAL,
Y FLOAT EXTERNAL,
Z FLOAT EXTERNAL
)
)
)