SOL-C01 · Question #204
SOL-C01 Question #204: Real Exam Question with Answer & Explanation
The correct answer is B: CREATE MATERIALIZED VIEW CLASSIFIED_REVIEWS AS SELECT REVIEW_TEXT, Quality',. The correct syntax for providing categories to CLASSIFY TEXT is using ARRAY CONSTRUCT. Option B is the only one that correctly uses ARRAY_CONSTRUCT to pass the categories as an array. Options A, C, D and E all use incorrect syntax and will result in errors. Materialized views are
Question
You have a table 'CUSTOMER REVIEWS' with a column 'REVIEW TEXT containing unstructured customer feedback. You want to use CLASSIFY TEXT to categorize these reviews into predefined categories like 'Product Quality', 'Customer Service', and 'Shipping'. You plan to create a materialized view to store the classifications for faster querying. Which of the following SQL statements is the most efficient and correct way to achieve this using CLASSIFY TEXT, assuming the function has already been granted usage privileges?
Options
- ACREATE MATERIALIZED VIEW CLASSIFIED_REVIEWS AS SELECT REVIEW_TEXT, 'Product
- BCREATE MATERIALIZED VIEW CLASSIFIED_REVIEWS AS SELECT REVIEW_TEXT, Quality',
- CCREATE MATERIALIZED VIEW CLASSIFIED_REVIEWS AS SELECT REVIEW_TEXT, OBJECT
- DCREATE MATERIALIZED VIEW CLASSIFIED_REVIEWS AS SELECT REVIEW_TEXT, Quality",
- ECREATE MATERIALIZED VIEW CLASSIFIED_REVIEWS AS SELECT REVIEW_TEXT, ['Product
Explanation
The correct syntax for providing categories to CLASSIFY TEXT is using ARRAY CONSTRUCT. Option B is the only one that correctly uses ARRAY_CONSTRUCT to pass the categories as an array. Options A, C, D and E all use incorrect syntax and will result in errors. Materialized views are suitable for storing the results of CLASSIFY TEXT for performance reasons.
Topics
Community Discussion
No community discussion yet for this question.