1Z0-184-25 Question 171
Single answerYou are building a geospatial analytics solution on Oracle Cloud Infrastructure 2025. Your Oracle Database instance is configured to handle Spatial features, and you have a large CSV file containing vector geometry data in Well-Known Text (WKT) format. You plan to load this data into a table with a column defined as SDO_GEOMETRY using SQL*Loader. Which approach ensures the WKT geometry is properly converted into SDO_GEOMETRY during the load process?
- A
Specify the geometry column as plain VARCHAR2 and rely on SQL*Loader to interpret WKT strings automatically.
- B
Use a control file expression that calls a conversion function, such as SDO_UTIL.FROM_WKTGEOMETRY, to transform the input into SDO_GEOMETRY.
- C
Load the data as an external table in CSV format, then run a post-load PL/SQL procedure to convert the geometry strings into SDO_GEOMETRY.
- D
Place the geometry data in a separate lookup table and join on the WKT strings to convert them into SDO_GEOMETRY at query time.
Show answer and explanation
Correct answer: B
Explanation
When loading vector data in WKT format into an SDO_GEOMETRY column, you can leverage the built-in function SDO_UTIL.FROM_WKTGEOMETRY in the SQLLoader control file. By specifying an expression in the control file (for example, "GEOM CHAR(4000) 'SDO_UTIL.FROM_WKTGEOMETRY(:GEOM)'"), SQLLoader converts the WKT string to an SDO_GEOMETRY object on the fly. This approach is documented in the Oracle Spatial and Graph Developer� Guide, which recommends using conversion functions in SQL*Loader for handling spatial data imports.
- A. Incorrect.
Incorrect. Simply defining the column as VARCHAR2 does not automatically convert WKT strings into SDO_GEOMETRY. SQL*Loader does not inherently convert text to geometry without an explicit function call in the control file.
- B. Correct.
Correct. By specifying a function such as SDO_UTIL.FROM_WKTGEOMETRY in the control file� column definition, SQL*Loader can dynamically convert the input WKT geometry strings into SDO_GEOMETRY during the load process.
- C. Incorrect.
Incorrect. While loading data into an external table and converting later using PL/SQL is possible, it adds an extra step and does not directly leverage SQLLoader� functionality to transform the data on load. The question specifically asks about direct conversion using SQLLoader.
- D. Incorrect.
Incorrect. Creating a separate lookup table for geometry conversion at query time is inefficient and complicates data management. It also does not provide the immediate SDO_GEOMETRY data type storage desired in the main table.