Partial Results Mode
I am struggling to get partial results mode working. I have two oracle databases in a multi-source setup. If one of these databases is down, the VDB should still provide results from the remaining one. I have set partialResultsMode=True on the conenction URL of the VDB, but this does not make any difference.
An clear example of how the enable this would be most welcome.
Ideally the partial results mode should work with an internal materialized view.
Responses
The multi-source definition needs to be correct, then adding partialResultsMode=true to the VDB Connection URL is all you need.
Example dynamic VDB:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<vdb name="multi_basic" version="1">
<description/>
<property name="validationDateTime" value="Mon Oct 31 08:01:36 CDT 2016"/>
<property name="validationVersion" value="8.12.6"/>
<model name="multi_phy" type="PHYSICAL" visible="true">
<property name="multisource" value="true"/>
<source connection-jndi-name="java:/deb" name="deb" translator-name="postgresql"/>
<source connection-jndi-name="java:/dv63" name="dv63" translator-name="postgresql"/>
<metadata type="DDL"><![CDATA[
CREATE FOREIGN TABLE emp (
id integer NOT NULL OPTIONS(NAMEINSOURCE '"id"', NATIVE_TYPE 'int4', CASE_SENSITIVE 'FALSE', FIXED_LENGTH 'TRUE', SEARCHABLE 'ALL_EXCEPT_LIKE'),
name string(2147483647) OPTIONS(NAMEINSOURCE '"name"', NATIVE_TYPE 'text'),
SOURCE_NAME string(50),
CONSTRAINT pk_emp PRIMARY KEY(id)
) OPTIONS(UPDATABLE 'true',NAMEINSOURCE '"public"."emp"')
]]></metadata>
</model>
<model name="multiv" type="VIRTUAL" visible="true">
<property name="imports" value="multi"/>
<metadata type="DDL"><![CDATA[
CREATE VIEW empview (
id integer,
name string(100)
)
AS
SELECT * FROM multi_phy.emp
]]></metadata>
</model>
</vdb>
Then connect jdbc:teiid:multi_basic@mm://127.0.0.1:31000;partialResultsMode=true
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
