-
1. Re: loadMatView EXECUTE IMMEDIATE is truncating Insert SQL statement
shawkins Feb 1, 2019 8:16 AM (in response to mtawk)> We tried to put the insert statement SQL into a clob variable and it is still truncated on 4000
[TEIID-4376] EXECUTE IMMEDIATE should accept clob - JBoss Issue Tracker and [TEIID-4378] Support clob concat - JBoss Issue Tracker do allow this in general, but with the way the dynamic sql is written the type will remain string - it won't automatically convert to a clob. It would instead need to be cast('INSERT INTO' as clob) || ... So an issue is needed to address that in the system procedures.
A workaround would be to adjust the maxStringLength system property - see System Properties · GitBook
> Also, we noticed that some log contexts used in SYSADMIN.sql are not valid (org.teiid.MATVIEWS) or it should be org.teiid.PROCESSOR.MATVIEWS
Yes that should be corrected as well. Can you log something on that?
-
2. Re: loadMatView EXECUTE IMMEDIATE is truncating Insert SQL statement
mtawk Feb 1, 2019 10:41 AM (in response to shawkins)We have already tried increasing maxStringLength but it did not solve the problem.
We tried your suggestion to put each part of the statement concatenation into a clob cast and it had solved the problem.
I have added a bug for the wrong log context: [TEIID-5641] Wrong Log Context in SYSADMIN.sql - JBoss Issue Tracker
-
3. Re: loadMatView EXECUTE IMMEDIATE is truncating Insert SQL statement
shawkins Feb 4, 2019 4:22 PM (in response to mtawk)Also captured [TEIID-5644] materialization procedures can hit max string length - JBoss Issue Tracker to address the root issue.