[JBoss JIRA] (TEIID-4269) numeric calculated fields not displayed with odata4
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-4269?page=com.atlassian.jira.plugin... ]
Ramesh Reddy commented on TEIID-4269:
-------------------------------------
What I was saying is "convert" function ignores the precision and scale values if they are mentioned on query. My concern is what other places this can be manifested. The solution could be ignoring the metadata provided and make odata layer metadata as wide as possible, but seems wrong.
> numeric calculated fields not displayed with odata4
> ---------------------------------------------------
>
> Key: TEIID-4269
> URL: https://issues.jboss.org/browse/TEIID-4269
> Project: Teiid
> Issue Type: Bug
> Components: OData
> Affects Versions: 8.13.3
> Reporter: Mirco Marchitiello
> Assignee: Ramesh Reddy
> Priority: Minor
>
> I've created a virtual table with a new field defined in this way:
> select ROUND((BA.PREIS / BA.PEINH), 3) AS UnitPrice from xxxxxx
> for the source field are bigdecimal I define UnitPrice as
> BigDecimal (13,3)
> If I run the qery from JDBC
> select * from PurchaseRequisitionEntity where PurchaseRequisitionKey = '300-8000001452-00010' ;
> PREIS = 539,568
> PEINH = 106
> UnitPrice = 5,090.264
> And the result is correct. If I run from odata2
> /odata/CASALE.1/Entities.PurchaseRequisitionEntity('300-8000001452-00010')?$format=json
> "UnitPrice" : "5090.2640000000000000"
> As you can see the field is rounded to the 3rd digit but 13 more digits are returned with 0 value.
> Anyway odata2 succeeds in returning the result without errors.
> With odata4 I get an error:
> /odata4/CASALE.1/Entities/PurchaseRequisitionEntity('300-8000001452-00010')?$format=json
> {"error":{"code":null,"message":"The value '5090.2640000000000000' is not valid for property 'UnitPrice'."}}
> I think that's because the length of the field is greater then the matedata definition.
> At the moment the only solution I can imagine is to convert the number to a string in the proper format and the parse it into a number
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 5 months
[JBoss JIRA] (TEIID-4269) numeric calculated fields not displayed with odata4
by Mirco Marchitiello (JIRA)
[ https://issues.jboss.org/browse/TEIID-4269?page=com.atlassian.jira.plugin... ]
Mirco Marchitiello commented on TEIID-4269:
-------------------------------------------
Actually with "Solution" I meant a workaround to make my production system work
I converted the number using the numeric functions PARSExxx and FORMATxxx
eg.
PARSEBIGDECIMAL(FORMATBIGDECIMAL(KTMNG, '#,##0.##;-#,##0.##'), '#,##0.##;-#,##0.##')
> numeric calculated fields not displayed with odata4
> ---------------------------------------------------
>
> Key: TEIID-4269
> URL: https://issues.jboss.org/browse/TEIID-4269
> Project: Teiid
> Issue Type: Bug
> Components: OData
> Affects Versions: 8.13.3
> Reporter: Mirco Marchitiello
> Assignee: Ramesh Reddy
> Priority: Minor
>
> I've created a virtual table with a new field defined in this way:
> select ROUND((BA.PREIS / BA.PEINH), 3) AS UnitPrice from xxxxxx
> for the source field are bigdecimal I define UnitPrice as
> BigDecimal (13,3)
> If I run the qery from JDBC
> select * from PurchaseRequisitionEntity where PurchaseRequisitionKey = '300-8000001452-00010' ;
> PREIS = 539,568
> PEINH = 106
> UnitPrice = 5,090.264
> And the result is correct. If I run from odata2
> /odata/CASALE.1/Entities.PurchaseRequisitionEntity('300-8000001452-00010')?$format=json
> "UnitPrice" : "5090.2640000000000000"
> As you can see the field is rounded to the 3rd digit but 13 more digits are returned with 0 value.
> Anyway odata2 succeeds in returning the result without errors.
> With odata4 I get an error:
> /odata4/CASALE.1/Entities/PurchaseRequisitionEntity('300-8000001452-00010')?$format=json
> {"error":{"code":null,"message":"The value '5090.2640000000000000' is not valid for property 'UnitPrice'."}}
> I think that's because the length of the field is greater then the matedata definition.
> At the moment the only solution I can imagine is to convert the number to a string in the proper format and the parse it into a number
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 5 months
[JBoss JIRA] (TEIID-4311) Teiid Admin Api not support to create XA datasource on Jboss server.
by Kylin Soong (JIRA)
[ https://issues.jboss.org/browse/TEIID-4311?page=com.atlassian.jira.plugin... ]
Kylin Soong commented on TEIID-4311:
------------------------------------
> Now coming down to setting "xa-datasource-properties", there is property called "connection-properties" you need to use that. See, how this is used in the driver creation, we need to re-purpose this property.
In Parameter properties, I also use xa-datasource-properties, cause if use "connection-properties", it's confused, no "connection-properties" in xa datasouce creation, but "connection-properties" exist in no-xa datasource creation.
> Teiid Admin Api not support to create XA datasource on Jboss server.
> --------------------------------------------------------------------
>
> Key: TEIID-4311
> URL: https://issues.jboss.org/browse/TEIID-4311
> Project: Teiid
> Issue Type: Bug
> Components: AdminApi
> Affects Versions: 8.13.x
> Reporter: Prakash Jape
> Assignee: Kylin Soong
> Fix For: 9.1, 9.0.2
>
>
> Teiid Admin api does not support or does not have capability to create XA datasource on Jboss server.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 5 months
[JBoss JIRA] (TEIID-4311) Teiid Admin Api not support to create XA datasource on Jboss server.
by Kylin Soong (JIRA)
[ https://issues.jboss.org/browse/TEIID-4311?page=com.atlassian.jira.plugin... ]
Kylin Soong commented on TEIID-4311:
------------------------------------
> The template definition properties for this "xa" template, we need to add three extra properties: ServerName, PortNumber, DatabaseName
I am not sure whether there are protocol to adress how to define datasouce properties, but Wildfly just judge whether there is a set method exist, I also check different datasource, there are different.
> Teiid Admin Api not support to create XA datasource on Jboss server.
> --------------------------------------------------------------------
>
> Key: TEIID-4311
> URL: https://issues.jboss.org/browse/TEIID-4311
> Project: Teiid
> Issue Type: Bug
> Components: AdminApi
> Affects Versions: 8.13.x
> Reporter: Prakash Jape
> Assignee: Kylin Soong
> Fix For: 9.1, 9.0.2
>
>
> Teiid Admin api does not support or does not have capability to create XA datasource on Jboss server.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 5 months
[JBoss JIRA] (TEIID-4311) Teiid Admin Api not support to create XA datasource on Jboss server.
by Kylin Soong (JIRA)
[ https://issues.jboss.org/browse/TEIID-4311?page=com.atlassian.jira.plugin... ]
Kylin Soong commented on TEIID-4311:
------------------------------------
> Now based on this, we need to introduce an extra template name with "xa-" as post fix
Does your means rename method parameter 'templateName' to xa-'templateName', how to understand template in create datasource? I am confused, as from source code you have written, 'templateName' is driver name if not create create resource adapter, and you validate jdbc-driver exist use 'templateName', it confused to rename jdbc-driver name.
By the way, WIldFly CLI is difficult/confused for user to understand, because it's structure flexible and complex, so I think we wrap all create no-xa datasource, create xa datasource, create resource adapter(create resource adapter need a template), jca spec related properties definition in a single method, it's also difficult/confused for user to use, especially, there is a Properties parameter, and Properties parameter contain properties connection-properties, xa-datasource-properties.(that could be just me)
> Teiid Admin Api not support to create XA datasource on Jboss server.
> --------------------------------------------------------------------
>
> Key: TEIID-4311
> URL: https://issues.jboss.org/browse/TEIID-4311
> Project: Teiid
> Issue Type: Bug
> Components: AdminApi
> Affects Versions: 8.13.x
> Reporter: Prakash Jape
> Assignee: Kylin Soong
> Fix For: 9.1, 9.0.2
>
>
> Teiid Admin api does not support or does not have capability to create XA datasource on Jboss server.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 5 months
[JBoss JIRA] (TEIID-4311) Teiid Admin Api not support to create XA datasource on Jboss server.
by Kylin Soong (JIRA)
[ https://issues.jboss.org/browse/TEIID-4311?page=com.atlassian.jira.plugin... ]
Kylin Soong commented on TEIID-4311:
------------------------------------
> This may NOT be straight forward as others. To find out a JDBC driver supports the XA connection, on the call [standalone@localhost:9999 /] /subsystem=datasources:installed-drivers-list
Why not use /subsystem=datasources:get-installed-driver(driver-name=name)
> Teiid Admin Api not support to create XA datasource on Jboss server.
> --------------------------------------------------------------------
>
> Key: TEIID-4311
> URL: https://issues.jboss.org/browse/TEIID-4311
> Project: Teiid
> Issue Type: Bug
> Components: AdminApi
> Affects Versions: 8.13.x
> Reporter: Prakash Jape
> Assignee: Kylin Soong
> Fix For: 9.1, 9.0.2
>
>
> Teiid Admin api does not support or does not have capability to create XA datasource on Jboss server.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 5 months
[JBoss JIRA] (TEIID-4311) Teiid Admin Api not support to create XA datasource on Jboss server.
by Kylin Soong (JIRA)
[ https://issues.jboss.org/browse/TEIID-4311?page=com.atlassian.jira.plugin... ]
Kylin Soong edited comment on TEIID-4311 at 7/5/16 8:16 PM:
------------------------------------------------------------
> properties provided "connection-properties" property
No "connection-properties" in xa-datasource creation, xa-datasource-properties instead. Yes, it's not just 5 lines, it's depend on properties number in single property xa-datasource-properties.
was (Author: kylin):
> properties provided "connection-properties" property
No "connection-properties" in xa-datasource creation, xa-datasource-properties instead.
> Teiid Admin Api not support to create XA datasource on Jboss server.
> --------------------------------------------------------------------
>
> Key: TEIID-4311
> URL: https://issues.jboss.org/browse/TEIID-4311
> Project: Teiid
> Issue Type: Bug
> Components: AdminApi
> Affects Versions: 8.13.x
> Reporter: Prakash Jape
> Assignee: Kylin Soong
> Fix For: 9.1, 9.0.2
>
>
> Teiid Admin api does not support or does not have capability to create XA datasource on Jboss server.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 5 months
[JBoss JIRA] (TEIID-4311) Teiid Admin Api not support to create XA datasource on Jboss server.
by Kylin Soong (JIRA)
[ https://issues.jboss.org/browse/TEIID-4311?page=com.atlassian.jira.plugin... ]
Kylin Soong edited comment on TEIID-4311 at 7/5/16 8:15 PM:
------------------------------------------------------------
> properties provided "connection-properties" property
No "connection-properties" in xa-datasource creation, xa-datasource-properties instead.
was (Author: kylin):
> properties provided "connection-properties" property
No "connection-properties" in xa-datasource creation
> Teiid Admin Api not support to create XA datasource on Jboss server.
> --------------------------------------------------------------------
>
> Key: TEIID-4311
> URL: https://issues.jboss.org/browse/TEIID-4311
> Project: Teiid
> Issue Type: Bug
> Components: AdminApi
> Affects Versions: 8.13.x
> Reporter: Prakash Jape
> Assignee: Kylin Soong
> Fix For: 9.1, 9.0.2
>
>
> Teiid Admin api does not support or does not have capability to create XA datasource on Jboss server.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 5 months