[
https://issues.jboss.org/browse/TEIID-3509?page=com.atlassian.jira.plugin...
]
Kylin Soong edited comment on TEIID-3509 at 5/18/16 7:13 AM:
-------------------------------------------------------------
1) The execution looks correct, what is the error you are seeing?
I was gotten confused by the document, but if look at the source code it's easy
to make sense
{code}
CREATE FOREIGN PROCEDURE refreshMatViewRow(OUT RowsUpdated integer NOT NULL RESULT, IN
ViewName string NOT NULL, IN Key object NOT NULL, VARIADIC KeyOther object) OPTIONS
(UPDATECOUNT 1)
{code}
Note that Key is the PK column, but PK may contain more columns, VARIADIC KeyOther is for
others, so if the mat view looks(only 1 column id is the PK)
{code}
+-----+----+----+----+
| id | a | b | c |
+-----+----+----+----+
| 100 | a0 | b0 | c0 |
| 101 | a1 | b1 | c1 |
| 102 | a2 | b2 | c2 |
+-----+----+----+----+
{code}
The SQL
{code}
EXEC SYSADMIN.refreshMatViewRows('TestInterMat.SAMPLEMATVIEW', ('101',
'102'))
{code}
is not make sense. If want update two rows use
{code}
EXEC SYSADMIN.refreshMatViewRows('TestInterMat.SAMPLEMATVIEW', ('101',),
('102',))
{code}
If PK have more columns, for example, id, a and b compose of the PK, then
{code}
EXEC SYSADMIN.refreshMatViewRows('TestInterMat.SAMPLEMATVIEW', ('101',
'a1', 'b1'), ('102', 'a2', 'b2'));
{code}
will update 2 rows, I will update the document.
was (Author: kylin):
1) The execution looks correct, what is the error you are seeing?
I was gotten confused by the document, but if look at the source code it's easy
to make sense
{code}
CREATE FOREIGN PROCEDURE refreshMatViewRow(OUT RowsUpdated integer NOT NULL RESULT, IN
ViewName string NOT NULL, IN Key object NOT NULL, VARIADIC KeyOther object) OPTIONS
(UPDATECOUNT 1)
{code}
Note that Key is the PK column, but PK may contain more columns, VARIADIC KeyOther is for
others, so if the mat view looks(only 1 column id is the PK)
{code}
+-----+----+----+----+
| id | a | b | c |
+-----+----+----+----+
| 100 | a0 | b0 | c0 |
| 101 | a1 | b1 | c1 |
| 102 | a2 | b2 | c2 |
+-----+----+----+----+
{code}
The SQL
{code}
EXEC SYSADMIN.refreshMatViewRows('TestInterMat.SAMPLEMATVIEW', ('101',
'102'))
{code}
is not make sense. If want update two rows use
{code}
EXEC SYSADMIN.refreshMatViewRows('TestInterMat.SAMPLEMATVIEW', ('101',),
('102',))
{code}
If PK have more columns, for example, id, a and b compose of the PK, then
{code}
EXEC SYSADMIN.refreshMatViewRows('TestInterMat.SAMPLEMATVIEW', ('101',
'a1', 'b1'), ('102', 'a2', 'b2'));
{code}
will update 2 rows, I will update the document.
By the way, as per Steven's comment in yesterday's meeting, refresh via PK is
related with cluster, but current external update not use primary key, does this fine?
Consolidate internal and external materialization management
------------------------------------------------------------
Key: TEIID-3509
URL:
https://issues.jboss.org/browse/TEIID-3509
Project: Teiid
Issue Type: Enhancement
Components: Server
Affects Versions: 8.7
Reporter: Ramesh Reddy
Assignee: Kylin Soong
Fix For: 9.0
- Currently there separate SYSADMIN procedures for internal and external materialization
to refresh them, we need to provide single set
- The management of the (usage of status table) is not fully utilized by the internal
materialization this needs to addressed such that both external and internal use this
table to keep track of load status
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)