I have a table xml_documents
with two columns: a document_id
column (primary key) and an xml
column with some XML data, which is a schema-less XMLType
. I can create a materialized view with just the document_id
with:
create materialized view mv refresh fast on commit as
select document_id
from xml_documents
This works fine, but isn't very useful. As you might expect, I'd like the materialized view to extract data from the XML, and for this I use extractValue()
. I am trying the following:
create materialized view mv refresh fast on commit as
select document_id, extractValue(xml, '/my/gaga') gaga
from xml_documents
This fails with:
ORA-12054: cannot set the ON COMMIT refresh attribute for the materialized view
How should I go about to create a fast refresh on commit materialized view that extract values from XML?