[JBoss JIRA] (TEIID-3335) Uniqueidentifier values are casted inside INSERT clause field list
by Nicholas D (JIRA)
[ https://issues.jboss.org/browse/TEIID-3335?page=com.atlassian.jira.plugin... ]
Nicholas D commented on TEIID-3335:
-----------------------------------
Hello,
Teiid 8.4.0 Final. Tried this query with 8.8.1 driver from Squirrel and with 8.9.1 from DBeaver so i don't think it's editor's fault.
Tried it with both dynamic and non-dynamic VDB.
In dynamic VDB this is the model:
<model name="ds">
<source connection-jndi-name="ds" name="ds" translator-name="sqlserver"/>
</model>
Please tell me if you can't reproduce the issue or i'm doing anything wrong.
> Uniqueidentifier values are casted inside INSERT clause field list
> ------------------------------------------------------------------
>
> Key: TEIID-3335
> URL: https://issues.jboss.org/browse/TEIID-3335
> Project: Teiid
> Issue Type: Bug
> Components: JDBC Connector
> Reporter: Nicholas D
> Assignee: Steven Hawkins
> Labels: sqlserver2012
> Fix For: 8.10
>
>
> When inserting into SQL Server table which has uniqueidentifier values - Teiid casts these fields to char(36) inside field list.
> Example. When i execute query
> bq. INSERT INTO TABLE(record_id, "time", tag_id, "value")
> VALUES(UUID(), NOW(), '123', 123);}}
> Teiid gives me error
> bq. Error: TEIID30504 Remote org.teiid.core.TeiidProcessingException: TEIID30504 ds: 102 TEIID11013:TEIID11004 Error executing statement(s): [Prepared Values: [{ts '2015-02-12 15:40:18.051'}] SQL: INSERT INTO "dbo"."TABLE" (cast("RECORD_ID" as char(36)), "TIME", "TAG_ID", "VALUE") VALUES (uuid(), ?, '123', 123)]
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 4 months
[JBoss JIRA] (TEIID-3319) Union with different datatypes gives error in mysql
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3319?page=com.atlassian.jira.plugin... ]
Steven Hawkins updated TEIID-3319:
----------------------------------
Fix Version/s: 8.10
Component/s: JDBC Connector
The simplest thing that we could do is to add a cast to each of the union branches. I'll make that change for 8.10.
> Union with different datatypes gives error in mysql
> ---------------------------------------------------
>
> Key: TEIID-3319
> URL: https://issues.jboss.org/browse/TEIID-3319
> Project: Teiid
> Issue Type: Bug
> Components: JDBC Connector
> Reporter: Mark Tawk
> Assignee: Steven Hawkins
> Fix For: 8.10
>
>
> Hello,
> I'm using Teiid 8.9.0 Alpha2 with mysql5.7 and mysql5 translator.
> I have a union query with fields of different types, int and varchar.
> Teiid is adding dynamically the cast as char to the int field but the jdbc query is giving an error on mysql level (Illegal mix of collations for operation 'UNION')
> I edited the generated jdbc query and added cast as char to both fields int and varchar, mysql executes the jdbc query without a problem.
> I added convert to String to both union fields in Teiid sql query, but the jdbc query generated by teiid is not adding the cast to the string field.
> Teiid sql query:
> select "ITRITPTicketsView"."ITRITPTicketsView_jiraissue_" as "ITRITPTicketsView_jiraissue_"
> from ((select convert("ITRITPTicketsView_sub"."jiraissue_ID", string) as "ITRITPTicketsView_jiraissue_" from "implifyBusinessModel"."ITRITPTicketsView" "ITRITPTicketsView_sub")
> union
> (select convert("SDView_sub"."incidentsm1_INCIDENT_ID", string) as "SDView_incidentsm1_INCIDENT_" from "implifyBusinessModel"."SDView" "SDView_sub")
> ) "ITRITPTicketsView"
> LIMIT 0 , 10
> The generated error:
> org.teiid.translator.jdbc.JDBCExecutionException: 1271 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: [] SQL: (SELECT cast(g_1.`jiraissue_ID` AS char) AS c_0 FROM `implify_view`.`ITRITPTicketsView` AS g_1) UNION (SELECT g_0.`incidentsm1_INCIDENT_ID` AS c_0 FROM `implify_view`.`SDView` AS g_0) LIMIT 10]
> at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:151)
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:326)
> 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)
> at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:58)
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:274)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:214)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:744)
> Caused by: java.sql.SQLException: Illegal mix of collations for operation 'UNION'
> at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1084)
> at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4232)
> at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4164)
> at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2615)
> at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2776)
> at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2838)
> at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2082)
> at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2212)
> at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)
> at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)
> at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:141)
> ... 12 more
> Feb 03, 2015 8:43:32 AM org.teiid.logging.JavaLogger log
> WARNING: TEIID30020 Processing exception for request AxQ9XTXrAYkm.0 'TEIID30504 implify_viewModelVDB: 1271 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: [] SQL: (SELECT cast(g_1.`jiraissue_ID` AS char) AS c_0 FROM `implify_view`.`ITRITPTicketsView` AS g_1) UNION (SELECT g_0.`incidentsm1_INCIDENT_ID` AS c_0 FROM `implify_view`.`SDView` AS g_0) LIMIT 10]'. Originally TeiidProcessingException 'Illegal mix of collations for operation 'UNION'' SQLError.java:1084. Enable more detailed logging to see the entire stacktrace.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 4 months
[JBoss JIRA] (TEIID-3334) MongoDB: invalid ip address and port number
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-3334?page=com.atlassian.jira.plugin... ]
Ramesh Reddy reassigned TEIID-3334:
-----------------------------------
Assignee: Ramesh Reddy (was: Steven Hawkins)
> MongoDB: invalid ip address and port number
> --------------------------------------------
>
> Key: TEIID-3334
> URL: https://issues.jboss.org/browse/TEIID-3334
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.9.1
> Environment: MongoDB with Teiid 8.9.1
> Reporter: Ivan Chan
> Assignee: Ramesh Reddy
>
> I got invalid IP address/ port number error when I have ":" in IP address.
> Caused by: java.lang.NumberFormatException: For input string: "jasper@ds041671.mongolab.com:41671"
> at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
> at java.lang.Integer.parseInt(Integer.java:492)
> at java.lang.Integer.valueOf(Integer.java:582)
> at org.teiid.resource.adapter.mongodb.MongoDBManagedConnectionFactory.getServers(MongoDBManagedConnectionFactory.java:129
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 4 months
[JBoss JIRA] (TEIID-3334) MongoDB: invalid ip address and port number
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-3334?page=com.atlassian.jira.plugin... ]
Ramesh Reddy commented on TEIID-3334:
-------------------------------------
I have not seen any examples before; may be they MongoDB changed in the latest version of their JAVA driver and trying to define a protocol for their client communications.
[~ichanjasper] What is version of the Java driver and MongoDB you are using. I may need to update to those versions and test.
> MongoDB: invalid ip address and port number
> --------------------------------------------
>
> Key: TEIID-3334
> URL: https://issues.jboss.org/browse/TEIID-3334
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.9.1
> Environment: MongoDB with Teiid 8.9.1
> Reporter: Ivan Chan
> Assignee: Steven Hawkins
>
> I got invalid IP address/ port number error when I have ":" in IP address.
> Caused by: java.lang.NumberFormatException: For input string: "jasper@ds041671.mongolab.com:41671"
> at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
> at java.lang.Integer.parseInt(Integer.java:492)
> at java.lang.Integer.valueOf(Integer.java:582)
> at org.teiid.resource.adapter.mongodb.MongoDBManagedConnectionFactory.getServers(MongoDBManagedConnectionFactory.java:129
--
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 Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-3331?page=com.atlassian.jira.plugin... ]
Ramesh Reddy updated TEIID-3331:
--------------------------------
Fix Version/s: 8.10
> 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
> Labels: CR2
> Fix For: 8.10
>
> 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 Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-3331?page=com.atlassian.jira.plugin... ]
Ramesh Reddy resolved TEIID-3331.
---------------------------------
Labels: CR2 (was: )
Resolution: Done
Fixed the spelling mistake and description
> 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
> Labels: CR2
> Fix For: 8.10
>
> 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-3334) MongoDB: invalid ip address and port number
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3334?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-3334:
---------------------------------------
he remote address list is currently expected to look like address:port(;address:port). It doesn't look like it's setup for something like mongodb://jasper:jasper@ds041671.mongolab.com:41671/domain
Ramesh can you take this one - do we even want the protocol prefix and domain suffix?
> MongoDB: invalid ip address and port number
> --------------------------------------------
>
> Key: TEIID-3334
> URL: https://issues.jboss.org/browse/TEIID-3334
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.9.1
> Environment: MongoDB with Teiid 8.9.1
> Reporter: Ivan Chan
> Assignee: Steven Hawkins
>
> I got invalid IP address/ port number error when I have ":" in IP address.
> Caused by: java.lang.NumberFormatException: For input string: "jasper@ds041671.mongolab.com:41671"
> at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
> at java.lang.Integer.parseInt(Integer.java:492)
> at java.lang.Integer.valueOf(Integer.java:582)
> at org.teiid.resource.adapter.mongodb.MongoDBManagedConnectionFactory.getServers(MongoDBManagedConnectionFactory.java:129
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 4 months
[JBoss JIRA] (TEIID-3335) Uniqueidentifier values are casted inside INSERT clause field list
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3335?page=com.atlassian.jira.plugin... ]
Steven Hawkins updated TEIID-3335:
----------------------------------
Affects Version/s: (was: 7.7)
> Uniqueidentifier values are casted inside INSERT clause field list
> ------------------------------------------------------------------
>
> Key: TEIID-3335
> URL: https://issues.jboss.org/browse/TEIID-3335
> Project: Teiid
> Issue Type: Bug
> Components: JDBC Connector
> Reporter: Nicholas D
> Assignee: Steven Hawkins
> Labels: sqlserver2012
> Fix For: 8.10
>
>
> When inserting into SQL Server table which has uniqueidentifier values - Teiid casts these fields to char(36) inside field list.
> Example. When i execute query
> bq. INSERT INTO TABLE(record_id, "time", tag_id, "value")
> VALUES(UUID(), NOW(), '123', 123);}}
> Teiid gives me error
> bq. Error: TEIID30504 Remote org.teiid.core.TeiidProcessingException: TEIID30504 ds: 102 TEIID11013:TEIID11004 Error executing statement(s): [Prepared Values: [{ts '2015-02-12 15:40:18.051'}] SQL: INSERT INTO "dbo"."TABLE" (cast("RECORD_ID" as char(36)), "TIME", "TAG_ID", "VALUE") VALUES (uuid(), ?, '123', 123)]
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 4 months
[JBoss JIRA] (TEIID-3335) Uniqueidentifier values are casted inside INSERT clause field list
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3335?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-3335:
---------------------------------------
I don't see this behavior. What version of Teiid are you using and is a custom translator involved?
> Uniqueidentifier values are casted inside INSERT clause field list
> ------------------------------------------------------------------
>
> Key: TEIID-3335
> URL: https://issues.jboss.org/browse/TEIID-3335
> Project: Teiid
> Issue Type: Bug
> Components: JDBC Connector
> Reporter: Nicholas D
> Assignee: Steven Hawkins
> Labels: sqlserver2012
> Fix For: 8.10
>
>
> When inserting into SQL Server table which has uniqueidentifier values - Teiid casts these fields to char(36) inside field list.
> Example. When i execute query
> bq. INSERT INTO TABLE(record_id, "time", tag_id, "value")
> VALUES(UUID(), NOW(), '123', 123);}}
> Teiid gives me error
> bq. Error: TEIID30504 Remote org.teiid.core.TeiidProcessingException: TEIID30504 ds: 102 TEIID11013:TEIID11004 Error executing statement(s): [Prepared Values: [{ts '2015-02-12 15:40:18.051'}] SQL: INSERT INTO "dbo"."TABLE" (cast("RECORD_ID" as char(36)), "TIME", "TAG_ID", "VALUE") VALUES (uuid(), ?, '123', 123)]
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 4 months