[JBoss JIRA] (TEIID-3328) Syntax error at or near "." running an INSERT INTO query in PostgreSQL
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3328?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-3328.
-----------------------------------
Resolution: Done
Ensured that aliasing is run for insert with a query expression.
> Syntax error at or near "." running an INSERT INTO query in PostgreSQL
> ----------------------------------------------------------------------
>
> Key: TEIID-3328
> URL: https://issues.jboss.org/browse/TEIID-3328
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 7.7
> Reporter: Salvatore R
> Assignee: Steven Hawkins
> Fix For: 8.10
>
>
> I defined these two tables in PostgreSQL:
> {code:sql}
> CREATE TABLE public.source (a integer);
> CREATE TABLE public.target (a integer);
> {code}
> and then I defined the following two views in the VDB, in a virtual model called "test_views":
> {code:sql}
> create view v1 as select a from pg.source group by a;
> create view v2 as select a from test_views.v1 group by a;
> {code}
> When I run this INSERT INTO query:
> {code:sql}
> insert into pg.target
> SELECT * FROM test_views.v2;
> {code}
> I get this exception:
> {code:sql}
> 14:40:23,702 WARN [org.teiid.CONNECTOR] (Worker1_QueryProcessorQueue1) ouLv6EaK1uoo Connector worker process failed for atomic-request=ouLv6EaK1uoo.0.2.0: org.teiid.translator.jdbc.JDBCExecutionException: 0 TEIID11013:TEIID11004 Error executing statement(s): [Prepared Values: [] SQL: INSERT INTO "public"."target" ("a") SELECT v1.a AS a FROM (SELECT "public"."source"."a" AS a FROM "public"."source" GROUP BY "public"."source"."a") AS test_views.v1 GROUP BY v1.a]
> at org.teiid.translator.jdbc.JDBCUpdateExecution.executeTranslatedCommand(JDBCUpdateExecution.java:252) [translator-jdbc-8.10.0.Beta2.jar:8.10.0.Beta2]
> at org.teiid.translator.jdbc.JDBCUpdateExecution.execute(JDBCUpdateExecution.java:80) [translator-jdbc-8.10.0.Beta2.jar:8.10.0.Beta2]
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem$1.execute(ConnectorWorkItem.java:368)
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:335)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_51]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_51]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_51]
> at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_51]
> at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:209)
> at com.sun.proxy.$Proxy47.execute(Unknown Source)
> at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:298)
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:110)
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:107)
> at java.util.concurrent.FutureTask.run(FutureTask.java:262) [rt.jar:1.7.0_51]
> at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:58)
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_51]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_51]
> at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_51]
> Caused by: org.postgresql.util.PSQLException: ERROR: syntax error at or near "."
> Position: 162
> at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2157)
> at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1886)
> at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
> at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:555)
> at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:417)
> at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:363)
> at org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:493)
> at org.teiid.translator.jdbc.JDBCUpdateExecution.executeTranslatedCommand(JDBCUpdateExecution.java:223) [translator-jdbc-8.10.0.Beta2.jar:8.10.0.Beta2]
> ... 20 more
> 14:40:23,736 WARN [org.teiid.PROCESSOR] (Worker0_QueryProcessorQueue2) ouLv6EaK1uoo TEIID30020 Processing exception for request ouLv6EaK1uoo.0 'TEIID30504 test_tables_pg
> : 0 TEIID11013:TEIID11004 Error executing statement(s): [Prepared Values: [] SQL: INSERT INTO "public"."target" ("a") SELECT v1.a AS a FROM (SELECT "public"."source"."a"
> AS a FROM "public"."source" GROUP BY "public"."source"."a") AS test_views.v1 GROUP BY v1.a]'. Originally TeiidProcessingException 'ERROR: syntax error at or near "."
> Position: 162' QueryExecutorImpl.java:2157. Enable more detailed logging to see the entire stacktrace.
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 4 months
[JBoss JIRA] (TEIID-3331) Problem with dynamic vdb column metadata - for salesforce source w/import property
by Mark Drilling (JIRA)
[ https://issues.jboss.org/browse/TEIID-3331?page=com.atlassian.jira.plugin... ]
Mark Drilling reassigned TEIID-3331:
------------------------------------
Assignee: Ramesh Reddy (was: Mark Drilling)
> Problem with dynamic vdb column metadata - for salesforce source w/import property
> ----------------------------------------------------------------------------------
>
> Key: TEIID-3331
> URL: https://issues.jboss.org/browse/TEIID-3331
> Project: Teiid
> Issue Type: Bug
> Components: Salesforce Connector
> Affects Versions: 8.7
> Reporter: Mark Drilling
> Assignee: Ramesh Reddy
> Attachments: SFVdb-vdb.xml
>
>
> There seems to be a problem with the column metadata for dynamic vdb with salesforce source. Here is my scenario.
> 1) Deploy dynamic vdb w/SF source (attached sample). The VDB sets the 'importer.ModelAuditFields' property to 'true'.
> 2) expose the vdb as a jdbc source, then connect to it.
> 3) get the column metadata for a table using
> connection.getMetaData().getColumns(null, null, fullTableName, null)
> When the vdb has 'importer.ModelAuditFields' = true, some of the columns are missing. Here is a comparison for one of the SF tables
> AccountFeed, (importer.modelAuditFields=false)
> --------------
> Id, ParentId, Type, IsDeleted, CommentCount, LikeCount
> AccountFeed, (importer.modelAuditFields=true)
> --------------
> Id, ParentId, Type, CreatedById, CreatedDate, IsDeleted
> with modelAuditFields=true, the audit fields (CreatedById, CreatedDate) are added, but CommentCount and LikeCount are missing. It seems to clip to the same number of cols as the modelAuditFields=false case.
> Second issue (minor)
> -----------------
> The display name for the property is slightly wrong.
> line 75 of SalesForceExecutionFactory is 'Audit Model Fields' - it should be 'Model Audit Fields'.
> line 362 of SalesForceMetadataProcessor - same thing. also suggest changing the description to something like 'Determines if the salesforce audit fields are modeled'
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 4 months
[JBoss JIRA] (TEIID-3331) Problem with dynamic vdb column metadata - for salesforce source w/import property
by Mark Drilling (JIRA)
[ https://issues.jboss.org/browse/TEIID-3331?page=com.atlassian.jira.plugin... ]
Mark Drilling updated TEIID-3331:
---------------------------------
Attachment: SFVdb-vdb.xml
> Problem with dynamic vdb column metadata - for salesforce source w/import property
> ----------------------------------------------------------------------------------
>
> Key: TEIID-3331
> URL: https://issues.jboss.org/browse/TEIID-3331
> Project: Teiid
> Issue Type: Bug
> Components: Salesforce Connector
> Affects Versions: 8.7
> Reporter: Mark Drilling
> Assignee: Ramesh Reddy
> Attachments: SFVdb-vdb.xml
>
>
> There seems to be a problem with the column metadata for dynamic vdb with salesforce source. Here is my scenario.
> 1) Deploy dynamic vdb w/SF source (attached sample). The VDB sets the 'importer.ModelAuditFields' property to 'true'.
> 2) expose the vdb as a jdbc source, then connect to it.
> 3) get the column metadata for a table using
> connection.getMetaData().getColumns(null, null, fullTableName, null)
> When the vdb has 'importer.ModelAuditFields' = true, some of the columns are missing. Here is a comparison for one of the SF tables
> AccountFeed, (importer.modelAuditFields=false)
> --------------
> Id, ParentId, Type, IsDeleted, CommentCount, LikeCount
> AccountFeed, (importer.modelAuditFields=true)
> --------------
> Id, ParentId, Type, CreatedById, CreatedDate, IsDeleted
> with modelAuditFields=true, the audit fields (CreatedById, CreatedDate) are added, but CommentCount and LikeCount are missing. It seems to clip to the same number of cols as the modelAuditFields=false case.
> Second issue (minor)
> -----------------
> The display name for the property is slightly wrong.
> line 75 of SalesForceExecutionFactory is 'Audit Model Fields' - it should be 'Model Audit Fields'.
> line 362 of SalesForceMetadataProcessor - same thing. also suggest changing the description to something like 'Determines if the salesforce audit fields are modeled'
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 4 months
[JBoss JIRA] (TEIID-3331) Problem with dynamic vdb column metadata - for salesforce source w/import property
by Mark Drilling (JIRA)
Mark Drilling created TEIID-3331:
------------------------------------
Summary: Problem with dynamic vdb column metadata - for salesforce source w/import property
Key: TEIID-3331
URL: https://issues.jboss.org/browse/TEIID-3331
Project: Teiid
Issue Type: Bug
Components: Salesforce Connector
Affects Versions: 8.7
Reporter: Mark Drilling
Assignee: Mark Drilling
There seems to be a problem with the column metadata for dynamic vdb with salesforce source. Here is my scenario.
1) Deploy dynamic vdb w/SF source (attached sample). The VDB sets the 'importer.ModelAuditFields' property to 'true'.
2) expose the vdb as a jdbc source, then connect to it.
3) get the column metadata for a table using
connection.getMetaData().getColumns(null, null, fullTableName, null)
When the vdb has 'importer.ModelAuditFields' = true, some of the columns are missing. Here is a comparison for one of the SF tables
AccountFeed, (importer.modelAuditFields=false)
--------------
Id, ParentId, Type, IsDeleted, CommentCount, LikeCount
AccountFeed, (importer.modelAuditFields=true)
--------------
Id, ParentId, Type, CreatedById, CreatedDate, IsDeleted
with modelAuditFields=true, the audit fields (CreatedById, CreatedDate) are added, but CommentCount and LikeCount are missing. It seems to clip to the same number of cols as the modelAuditFields=false case.
Second issue (minor)
-----------------
The display name for the property is slightly wrong.
line 75 of SalesForceExecutionFactory is 'Audit Model Fields' - it should be 'Model Audit Fields'.
line 362 of SalesForceMetadataProcessor - same thing. also suggest changing the description to something like 'Determines if the salesforce audit fields are modeled'
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 4 months
[JBoss JIRA] (TEIID-3330) Add relational node id to plans to match debug log
by Steven Hawkins (JIRA)
Steven Hawkins created TEIID-3330:
-------------------------------------
Summary: Add relational node id to plans to match debug log
Key: TEIID-3330
URL: https://issues.jboss.org/browse/TEIID-3330
Project: Teiid
Issue Type: Quality Risk
Components: Query Engine
Reporter: Steven Hawkins
Assignee: Steven Hawkins
Fix For: 8.10
The processing plans would match up better with the debug log if the node id for relational plans were also included in the plan.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 4 months