[JBoss JIRA] (TEIID-4926) Couchbase - unable to retrieve data if using 'convert' in view definition
by Van Halbert (JIRA)
[ https://issues.jboss.org/browse/TEIID-4926?page=com.atlassian.jira.plugin... ]
Van Halbert updated TEIID-4926:
-------------------------------
Fix Version/s: 8.12.x-6.4
> Couchbase - unable to retrieve data if using 'convert' in view definition
> -------------------------------------------------------------------------
>
> Key: TEIID-4926
> URL: https://issues.jboss.org/browse/TEIID-4926
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 9.3
> Reporter: Juraj Duráni
> Assignee: Kylin Soong
> Priority: Blocker
> Fix For: 9.3, 8.12.x-6.4
>
>
> I have a simple document structure in Couchbase (no nested documents, all values are strings, integers, and booleans).
> I have a source model with proper types (strings, integers, booleans) and view model defined with my target types (float, double, date,...) all with appropriate conversion.
> There are basically two issues:
> - When I try to retrieve all data from the view, Teiid ends with exception \[1\]. This is wired.
> - When I try to use explicit convert on some columns from source table (not view) it ends with similar exception \[2\].
> Additional information:
> I represent 'Null' values by excluding key from the document (nevertheless, same error occurs even if I add explicit "key":null to the definition of the document).
> \[1\]
> TEIID10076 Invalid conversion from type class java.lang.Integer with value '-24' to type class java.sql.Date
> \[2\] - case for data value
> TEIID10076 Invalid conversion from type class java.lang.Object with value '\{\}' to type class java.sql.Date
> \[3\] - Queries
> {code:sql}
> OK - select * from couchbase.smalla
> FAIL - select * from bqt1.smalla
> FAIL - select convert(datevalue, date) from couchbase.smalla
> {code}
> \[4\] VDB definition
> {code:sql}
> -- source model
> SET NAMESPACE 'http://www.teiid.org/translator/couchbase/2017' AS teiid_couchbase;
> CREATE FOREIGN TABLE SmallA (
> documentID string,
> FloatNum integer OPTIONS (NAMEINSOURCE '`smalla`.`FloatNum`'),
> IntKey integer PRIMARY KEY OPTIONS (NAMEINSOURCE '`smalla`.`IntKey`'),
> BigIntegerValue integer OPTIONS (NAMEINSOURCE '`smalla`.`BigIntegerValue`'),
> StringKey string OPTIONS (NAMEINSOURCE '`smalla`.`StringKey`'),
> CharValue string OPTIONS (NAMEINSOURCE '`smalla`.`CharValue`'),
> LongNum integer OPTIONS (NAMEINSOURCE '`smalla`.`LongNum`'),
> type string OPTIONS (NAMEINSOURCE '`smalla`.`type`'),
> DoubleNum integer OPTIONS (NAMEINSOURCE '`smalla`.`DoubleNum`'),
> ObjectValue string OPTIONS (NAMEINSOURCE '`smalla`.`ObjectValue`'),
> ShortValue integer OPTIONS (NAMEINSOURCE '`smalla`.`ShortValue`'),
> BigDecimalValue integer OPTIONS (NAMEINSOURCE '`smalla`.`BigDecimalValue`'),
> DateValue string OPTIONS (NAMEINSOURCE '`smalla`.`DateValue`'),
> BooleanValue boolean OPTIONS (NAMEINSOURCE '`smalla`.`BooleanValue`'),
> TimestampValue string OPTIONS (NAMEINSOURCE '`smalla`.`TimestampValue`'),
> ByteNum integer OPTIONS (NAMEINSOURCE '`smalla`.`ByteNum`'),
> StringNum string OPTIONS (NAMEINSOURCE '`smalla`.`StringNum`'),
> TimeValue string OPTIONS (NAMEINSOURCE '`smalla`.`TimeValue`'),
> IntNum integer OPTIONS (NAMEINSOURCE '`smalla`.`IntNum`')
> ) OPTIONS (NAMEINSOURCE '`smalla`', UPDATABLE FALSE, "teiid_couchbase:ISARRAYTABLE" 'false', "teiid_couchbase:NAMEDTYPEPAIR" '`type`:''SmallA''');
> -- view model
> CREATE VIEW SmallA (
> IntKey integer PRIMARY KEY,
> StringKey string,
> IntNum integer,
> StringNum string,
> FloatNum float,
> LongNum long,
> DoubleNum double,
> ByteNum byte,
> DateValue date,
> TimeValue time,
> TimestampValue timestamp,
> BooleanValue boolean,
> CharValue char(1),
> ShortValue short,
> BigIntegerValue biginteger,
> BigDecimalValue bigdecimal,
> ObjectValue object)
> AS
> SELECT
> IntKey, StringKey, IntNum, StringNum, convert(FloatNum, float) AS FloatNum, convert(LongNum, long) AS LongNum,
> convert(DoubleNum, double) AS DoubleNum, convert(ByteNum, byte) AS ByteNum, convert(DateValue, date) AS DateValue,
> convert(TimeValue, time) AS TimeValue, convert(TimestampValue, timestamp) AS TimstampValue, BooleanValue,
> convert(CharValue, char) AS CharValue, convert(ShortValue, short) AS ShortValue, convert(BigIntegerValue, biginteger) AS BigIntegerValue,
> convert(BigDecimalValue, bigdecimal) AS BigDecimalValue, convert(ObjectValue, object) AS ObjectValue
> FROM
> Couchbase.SmallA;
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 7 months
[JBoss JIRA] (TEIID-4926) Couchbase - unable to retrieve data if using 'convert' in view definition
by Van Halbert (JIRA)
[ https://issues.jboss.org/browse/TEIID-4926?page=com.atlassian.jira.plugin... ]
Van Halbert updated TEIID-4926:
-------------------------------
Git Pull Request: https://github.com/teiid/teiid/pull/961
> Couchbase - unable to retrieve data if using 'convert' in view definition
> -------------------------------------------------------------------------
>
> Key: TEIID-4926
> URL: https://issues.jboss.org/browse/TEIID-4926
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 9.3
> Reporter: Juraj Duráni
> Assignee: Kylin Soong
> Priority: Blocker
> Fix For: 9.3, 8.12.x-6.4
>
>
> I have a simple document structure in Couchbase (no nested documents, all values are strings, integers, and booleans).
> I have a source model with proper types (strings, integers, booleans) and view model defined with my target types (float, double, date,...) all with appropriate conversion.
> There are basically two issues:
> - When I try to retrieve all data from the view, Teiid ends with exception \[1\]. This is wired.
> - When I try to use explicit convert on some columns from source table (not view) it ends with similar exception \[2\].
> Additional information:
> I represent 'Null' values by excluding key from the document (nevertheless, same error occurs even if I add explicit "key":null to the definition of the document).
> \[1\]
> TEIID10076 Invalid conversion from type class java.lang.Integer with value '-24' to type class java.sql.Date
> \[2\] - case for data value
> TEIID10076 Invalid conversion from type class java.lang.Object with value '\{\}' to type class java.sql.Date
> \[3\] - Queries
> {code:sql}
> OK - select * from couchbase.smalla
> FAIL - select * from bqt1.smalla
> FAIL - select convert(datevalue, date) from couchbase.smalla
> {code}
> \[4\] VDB definition
> {code:sql}
> -- source model
> SET NAMESPACE 'http://www.teiid.org/translator/couchbase/2017' AS teiid_couchbase;
> CREATE FOREIGN TABLE SmallA (
> documentID string,
> FloatNum integer OPTIONS (NAMEINSOURCE '`smalla`.`FloatNum`'),
> IntKey integer PRIMARY KEY OPTIONS (NAMEINSOURCE '`smalla`.`IntKey`'),
> BigIntegerValue integer OPTIONS (NAMEINSOURCE '`smalla`.`BigIntegerValue`'),
> StringKey string OPTIONS (NAMEINSOURCE '`smalla`.`StringKey`'),
> CharValue string OPTIONS (NAMEINSOURCE '`smalla`.`CharValue`'),
> LongNum integer OPTIONS (NAMEINSOURCE '`smalla`.`LongNum`'),
> type string OPTIONS (NAMEINSOURCE '`smalla`.`type`'),
> DoubleNum integer OPTIONS (NAMEINSOURCE '`smalla`.`DoubleNum`'),
> ObjectValue string OPTIONS (NAMEINSOURCE '`smalla`.`ObjectValue`'),
> ShortValue integer OPTIONS (NAMEINSOURCE '`smalla`.`ShortValue`'),
> BigDecimalValue integer OPTIONS (NAMEINSOURCE '`smalla`.`BigDecimalValue`'),
> DateValue string OPTIONS (NAMEINSOURCE '`smalla`.`DateValue`'),
> BooleanValue boolean OPTIONS (NAMEINSOURCE '`smalla`.`BooleanValue`'),
> TimestampValue string OPTIONS (NAMEINSOURCE '`smalla`.`TimestampValue`'),
> ByteNum integer OPTIONS (NAMEINSOURCE '`smalla`.`ByteNum`'),
> StringNum string OPTIONS (NAMEINSOURCE '`smalla`.`StringNum`'),
> TimeValue string OPTIONS (NAMEINSOURCE '`smalla`.`TimeValue`'),
> IntNum integer OPTIONS (NAMEINSOURCE '`smalla`.`IntNum`')
> ) OPTIONS (NAMEINSOURCE '`smalla`', UPDATABLE FALSE, "teiid_couchbase:ISARRAYTABLE" 'false', "teiid_couchbase:NAMEDTYPEPAIR" '`type`:''SmallA''');
> -- view model
> CREATE VIEW SmallA (
> IntKey integer PRIMARY KEY,
> StringKey string,
> IntNum integer,
> StringNum string,
> FloatNum float,
> LongNum long,
> DoubleNum double,
> ByteNum byte,
> DateValue date,
> TimeValue time,
> TimestampValue timestamp,
> BooleanValue boolean,
> CharValue char(1),
> ShortValue short,
> BigIntegerValue biginteger,
> BigDecimalValue bigdecimal,
> ObjectValue object)
> AS
> SELECT
> IntKey, StringKey, IntNum, StringNum, convert(FloatNum, float) AS FloatNum, convert(LongNum, long) AS LongNum,
> convert(DoubleNum, double) AS DoubleNum, convert(ByteNum, byte) AS ByteNum, convert(DateValue, date) AS DateValue,
> convert(TimeValue, time) AS TimeValue, convert(TimestampValue, timestamp) AS TimstampValue, BooleanValue,
> convert(CharValue, char) AS CharValue, convert(ShortValue, short) AS ShortValue, convert(BigIntegerValue, biginteger) AS BigIntegerValue,
> convert(BigDecimalValue, bigdecimal) AS BigDecimalValue, convert(ObjectValue, object) AS ObjectValue
> FROM
> Couchbase.SmallA;
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 7 months
[JBoss JIRA] (TEIID-4926) Couchbase - unable to retrieve data if using 'convert' in view definition
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4926?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-4926.
-----------------------------------
Fix Version/s: 9.3
Resolution: Done
Merged the pull request and changed the supportsConvert logic to only support couchbase types.
> Couchbase - unable to retrieve data if using 'convert' in view definition
> -------------------------------------------------------------------------
>
> Key: TEIID-4926
> URL: https://issues.jboss.org/browse/TEIID-4926
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 9.3
> Reporter: Juraj Duráni
> Assignee: Kylin Soong
> Priority: Blocker
> Fix For: 9.3
>
>
> I have a simple document structure in Couchbase (no nested documents, all values are strings, integers, and booleans).
> I have a source model with proper types (strings, integers, booleans) and view model defined with my target types (float, double, date,...) all with appropriate conversion.
> There are basically two issues:
> - When I try to retrieve all data from the view, Teiid ends with exception \[1\]. This is wired.
> - When I try to use explicit convert on some columns from source table (not view) it ends with similar exception \[2\].
> Additional information:
> I represent 'Null' values by excluding key from the document (nevertheless, same error occurs even if I add explicit "key":null to the definition of the document).
> \[1\]
> TEIID10076 Invalid conversion from type class java.lang.Integer with value '-24' to type class java.sql.Date
> \[2\] - case for data value
> TEIID10076 Invalid conversion from type class java.lang.Object with value '\{\}' to type class java.sql.Date
> \[3\] - Queries
> {code:sql}
> OK - select * from couchbase.smalla
> FAIL - select * from bqt1.smalla
> FAIL - select convert(datevalue, date) from couchbase.smalla
> {code}
> \[4\] VDB definition
> {code:sql}
> -- source model
> SET NAMESPACE 'http://www.teiid.org/translator/couchbase/2017' AS teiid_couchbase;
> CREATE FOREIGN TABLE SmallA (
> documentID string,
> FloatNum integer OPTIONS (NAMEINSOURCE '`smalla`.`FloatNum`'),
> IntKey integer PRIMARY KEY OPTIONS (NAMEINSOURCE '`smalla`.`IntKey`'),
> BigIntegerValue integer OPTIONS (NAMEINSOURCE '`smalla`.`BigIntegerValue`'),
> StringKey string OPTIONS (NAMEINSOURCE '`smalla`.`StringKey`'),
> CharValue string OPTIONS (NAMEINSOURCE '`smalla`.`CharValue`'),
> LongNum integer OPTIONS (NAMEINSOURCE '`smalla`.`LongNum`'),
> type string OPTIONS (NAMEINSOURCE '`smalla`.`type`'),
> DoubleNum integer OPTIONS (NAMEINSOURCE '`smalla`.`DoubleNum`'),
> ObjectValue string OPTIONS (NAMEINSOURCE '`smalla`.`ObjectValue`'),
> ShortValue integer OPTIONS (NAMEINSOURCE '`smalla`.`ShortValue`'),
> BigDecimalValue integer OPTIONS (NAMEINSOURCE '`smalla`.`BigDecimalValue`'),
> DateValue string OPTIONS (NAMEINSOURCE '`smalla`.`DateValue`'),
> BooleanValue boolean OPTIONS (NAMEINSOURCE '`smalla`.`BooleanValue`'),
> TimestampValue string OPTIONS (NAMEINSOURCE '`smalla`.`TimestampValue`'),
> ByteNum integer OPTIONS (NAMEINSOURCE '`smalla`.`ByteNum`'),
> StringNum string OPTIONS (NAMEINSOURCE '`smalla`.`StringNum`'),
> TimeValue string OPTIONS (NAMEINSOURCE '`smalla`.`TimeValue`'),
> IntNum integer OPTIONS (NAMEINSOURCE '`smalla`.`IntNum`')
> ) OPTIONS (NAMEINSOURCE '`smalla`', UPDATABLE FALSE, "teiid_couchbase:ISARRAYTABLE" 'false', "teiid_couchbase:NAMEDTYPEPAIR" '`type`:''SmallA''');
> -- view model
> CREATE VIEW SmallA (
> IntKey integer PRIMARY KEY,
> StringKey string,
> IntNum integer,
> StringNum string,
> FloatNum float,
> LongNum long,
> DoubleNum double,
> ByteNum byte,
> DateValue date,
> TimeValue time,
> TimestampValue timestamp,
> BooleanValue boolean,
> CharValue char(1),
> ShortValue short,
> BigIntegerValue biginteger,
> BigDecimalValue bigdecimal,
> ObjectValue object)
> AS
> SELECT
> IntKey, StringKey, IntNum, StringNum, convert(FloatNum, float) AS FloatNum, convert(LongNum, long) AS LongNum,
> convert(DoubleNum, double) AS DoubleNum, convert(ByteNum, byte) AS ByteNum, convert(DateValue, date) AS DateValue,
> convert(TimeValue, time) AS TimeValue, convert(TimestampValue, timestamp) AS TimstampValue, BooleanValue,
> convert(CharValue, char) AS CharValue, convert(ShortValue, short) AS ShortValue, convert(BigIntegerValue, biginteger) AS BigIntegerValue,
> convert(BigDecimalValue, bigdecimal) AS BigDecimalValue, convert(ObjectValue, object) AS ObjectValue
> FROM
> Couchbase.SmallA;
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 7 months
[JBoss JIRA] (TEIID-4931) No Deployed Virtual Databases on console
by Pedro Inácio (JIRA)
[ https://issues.jboss.org/browse/TEIID-4931?page=com.atlassian.jira.plugin... ]
Pedro Inácio updated TEIID-4931:
--------------------------------
Attachment: server.log
> No Deployed Virtual Databases on console
> ----------------------------------------
>
> Key: TEIID-4931
> URL: https://issues.jboss.org/browse/TEIID-4931
> Project: Teiid
> Issue Type: Bug
> Affects Versions: 9.2.3
> Environment: * Wildfly 10
> * Teiid Server 9.2.3
> Reporter: Pedro Inácio
> Assignee: Steven Hawkins
> Attachments: image-2017-05-24-17-24-08-386.png, server.log
>
>
> After several deploys/undeploys of several VDBs, no VDB is listed any longer on console (Deployed Virtual Databases), although VDBs are effectively deployed.
> On logs:
> 2017-05-24 16:17:49,223 INFO [org.teiid.RUNTIME.VDBLifeCycleListener] (Worker2_async-teiid-threads2) TEIID40003 VDB NetSuiteMappingVDB.1 is set to ACTIVE
> 2017-05-24 16:17:49,271 INFO [org.teiid.RUNTIME.VDBLifeCycleListener] (Worker0_async-teiid-threads0) TEIID40003 VDB CerillionVDB.1 is set to ACTIVE
> 2017-05-24 16:17:50,187 INFO [org.teiid.RUNTIME.VDBLifeCycleListener] (Worker3_async-teiid-threads3) TEIID40003 VDB SalesForceVDB.1 is set to ACTIVE
> 2017-05-24 16:17:50,609 INFO [org.teiid.RUNTIME.VDBLifeCycleListener] (Worker4_async-teiid-threads4) TEIID40003 VDB BillingVDB.1 is set to ACTIVE
> 2017-05-24 16:17:52,012 INFO [org.teiid.RUNTIME.VDBLifeCycleListener] (Worker3_async-teiid-threads5) TEIID40003 VDB CustomerVDB.1 is set to ACTIVE
> 2017-05-24 16:18:26,238 INFO [org.teiid.RUNTIME.VDBLifeCycleListener] (Worker1_async-teiid-threads1) TEIID40003 VDB NetSuiteVDB.1 is set to ACTIVE
> 2017-05-24 16:18:26,584 INFO [org.teiid.RUNTIME.VDBLifeCycleListener] (Worker1_async-teiid-threads6) TEIID40003 VDB ReferenceDataVDB.1 is set to ACTIVE
> 2017-05-24 16:18:27,115 INFO [org.teiid.RUNTIME.VDBLifeCycleListener] (Worker1_async-teiid-threads7) TEIID40003 VDB FinanceVDB.1 is set to ACTIVE
> On console.
> !image-2017-05-24-17-24-08-386.png|thumbnail!
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 7 months
[JBoss JIRA] (TEIID-4926) Couchbase - unable to retrieve data if using 'convert' in view definition
by Van Halbert (JIRA)
[ https://issues.jboss.org/browse/TEIID-4926?page=com.atlassian.jira.plugin... ]
Van Halbert edited comment on TEIID-4926 at 5/24/17 12:49 PM:
--------------------------------------------------------------
that's ok, i'll cherry pick ur changes and backport. I'll do that after Steve makes his changes.
was (Author: van.halbert):
that's ok, i'll cherry pick ur changes and backport.
> Couchbase - unable to retrieve data if using 'convert' in view definition
> -------------------------------------------------------------------------
>
> Key: TEIID-4926
> URL: https://issues.jboss.org/browse/TEIID-4926
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 9.3
> Reporter: Juraj Duráni
> Assignee: Kylin Soong
> Priority: Blocker
>
> I have a simple document structure in Couchbase (no nested documents, all values are strings, integers, and booleans).
> I have a source model with proper types (strings, integers, booleans) and view model defined with my target types (float, double, date,...) all with appropriate conversion.
> There are basically two issues:
> - When I try to retrieve all data from the view, Teiid ends with exception \[1\]. This is wired.
> - When I try to use explicit convert on some columns from source table (not view) it ends with similar exception \[2\].
> Additional information:
> I represent 'Null' values by excluding key from the document (nevertheless, same error occurs even if I add explicit "key":null to the definition of the document).
> \[1\]
> TEIID10076 Invalid conversion from type class java.lang.Integer with value '-24' to type class java.sql.Date
> \[2\] - case for data value
> TEIID10076 Invalid conversion from type class java.lang.Object with value '\{\}' to type class java.sql.Date
> \[3\] - Queries
> {code:sql}
> OK - select * from couchbase.smalla
> FAIL - select * from bqt1.smalla
> FAIL - select convert(datevalue, date) from couchbase.smalla
> {code}
> \[4\] VDB definition
> {code:sql}
> -- source model
> SET NAMESPACE 'http://www.teiid.org/translator/couchbase/2017' AS teiid_couchbase;
> CREATE FOREIGN TABLE SmallA (
> documentID string,
> FloatNum integer OPTIONS (NAMEINSOURCE '`smalla`.`FloatNum`'),
> IntKey integer PRIMARY KEY OPTIONS (NAMEINSOURCE '`smalla`.`IntKey`'),
> BigIntegerValue integer OPTIONS (NAMEINSOURCE '`smalla`.`BigIntegerValue`'),
> StringKey string OPTIONS (NAMEINSOURCE '`smalla`.`StringKey`'),
> CharValue string OPTIONS (NAMEINSOURCE '`smalla`.`CharValue`'),
> LongNum integer OPTIONS (NAMEINSOURCE '`smalla`.`LongNum`'),
> type string OPTIONS (NAMEINSOURCE '`smalla`.`type`'),
> DoubleNum integer OPTIONS (NAMEINSOURCE '`smalla`.`DoubleNum`'),
> ObjectValue string OPTIONS (NAMEINSOURCE '`smalla`.`ObjectValue`'),
> ShortValue integer OPTIONS (NAMEINSOURCE '`smalla`.`ShortValue`'),
> BigDecimalValue integer OPTIONS (NAMEINSOURCE '`smalla`.`BigDecimalValue`'),
> DateValue string OPTIONS (NAMEINSOURCE '`smalla`.`DateValue`'),
> BooleanValue boolean OPTIONS (NAMEINSOURCE '`smalla`.`BooleanValue`'),
> TimestampValue string OPTIONS (NAMEINSOURCE '`smalla`.`TimestampValue`'),
> ByteNum integer OPTIONS (NAMEINSOURCE '`smalla`.`ByteNum`'),
> StringNum string OPTIONS (NAMEINSOURCE '`smalla`.`StringNum`'),
> TimeValue string OPTIONS (NAMEINSOURCE '`smalla`.`TimeValue`'),
> IntNum integer OPTIONS (NAMEINSOURCE '`smalla`.`IntNum`')
> ) OPTIONS (NAMEINSOURCE '`smalla`', UPDATABLE FALSE, "teiid_couchbase:ISARRAYTABLE" 'false', "teiid_couchbase:NAMEDTYPEPAIR" '`type`:''SmallA''');
> -- view model
> CREATE VIEW SmallA (
> IntKey integer PRIMARY KEY,
> StringKey string,
> IntNum integer,
> StringNum string,
> FloatNum float,
> LongNum long,
> DoubleNum double,
> ByteNum byte,
> DateValue date,
> TimeValue time,
> TimestampValue timestamp,
> BooleanValue boolean,
> CharValue char(1),
> ShortValue short,
> BigIntegerValue biginteger,
> BigDecimalValue bigdecimal,
> ObjectValue object)
> AS
> SELECT
> IntKey, StringKey, IntNum, StringNum, convert(FloatNum, float) AS FloatNum, convert(LongNum, long) AS LongNum,
> convert(DoubleNum, double) AS DoubleNum, convert(ByteNum, byte) AS ByteNum, convert(DateValue, date) AS DateValue,
> convert(TimeValue, time) AS TimeValue, convert(TimestampValue, timestamp) AS TimstampValue, BooleanValue,
> convert(CharValue, char) AS CharValue, convert(ShortValue, short) AS ShortValue, convert(BigIntegerValue, biginteger) AS BigIntegerValue,
> convert(BigDecimalValue, bigdecimal) AS BigDecimalValue, convert(ObjectValue, object) AS ObjectValue
> FROM
> Couchbase.SmallA;
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 7 months
[JBoss JIRA] (TEIID-4926) Couchbase - unable to retrieve data if using 'convert' in view definition
by Van Halbert (JIRA)
[ https://issues.jboss.org/browse/TEIID-4926?page=com.atlassian.jira.plugin... ]
Van Halbert commented on TEIID-4926:
------------------------------------
that's ok, i'll cherry pick ur changes and backport.
> Couchbase - unable to retrieve data if using 'convert' in view definition
> -------------------------------------------------------------------------
>
> Key: TEIID-4926
> URL: https://issues.jboss.org/browse/TEIID-4926
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 9.3
> Reporter: Juraj Duráni
> Assignee: Kylin Soong
> Priority: Blocker
>
> I have a simple document structure in Couchbase (no nested documents, all values are strings, integers, and booleans).
> I have a source model with proper types (strings, integers, booleans) and view model defined with my target types (float, double, date,...) all with appropriate conversion.
> There are basically two issues:
> - When I try to retrieve all data from the view, Teiid ends with exception \[1\]. This is wired.
> - When I try to use explicit convert on some columns from source table (not view) it ends with similar exception \[2\].
> Additional information:
> I represent 'Null' values by excluding key from the document (nevertheless, same error occurs even if I add explicit "key":null to the definition of the document).
> \[1\]
> TEIID10076 Invalid conversion from type class java.lang.Integer with value '-24' to type class java.sql.Date
> \[2\] - case for data value
> TEIID10076 Invalid conversion from type class java.lang.Object with value '\{\}' to type class java.sql.Date
> \[3\] - Queries
> {code:sql}
> OK - select * from couchbase.smalla
> FAIL - select * from bqt1.smalla
> FAIL - select convert(datevalue, date) from couchbase.smalla
> {code}
> \[4\] VDB definition
> {code:sql}
> -- source model
> SET NAMESPACE 'http://www.teiid.org/translator/couchbase/2017' AS teiid_couchbase;
> CREATE FOREIGN TABLE SmallA (
> documentID string,
> FloatNum integer OPTIONS (NAMEINSOURCE '`smalla`.`FloatNum`'),
> IntKey integer PRIMARY KEY OPTIONS (NAMEINSOURCE '`smalla`.`IntKey`'),
> BigIntegerValue integer OPTIONS (NAMEINSOURCE '`smalla`.`BigIntegerValue`'),
> StringKey string OPTIONS (NAMEINSOURCE '`smalla`.`StringKey`'),
> CharValue string OPTIONS (NAMEINSOURCE '`smalla`.`CharValue`'),
> LongNum integer OPTIONS (NAMEINSOURCE '`smalla`.`LongNum`'),
> type string OPTIONS (NAMEINSOURCE '`smalla`.`type`'),
> DoubleNum integer OPTIONS (NAMEINSOURCE '`smalla`.`DoubleNum`'),
> ObjectValue string OPTIONS (NAMEINSOURCE '`smalla`.`ObjectValue`'),
> ShortValue integer OPTIONS (NAMEINSOURCE '`smalla`.`ShortValue`'),
> BigDecimalValue integer OPTIONS (NAMEINSOURCE '`smalla`.`BigDecimalValue`'),
> DateValue string OPTIONS (NAMEINSOURCE '`smalla`.`DateValue`'),
> BooleanValue boolean OPTIONS (NAMEINSOURCE '`smalla`.`BooleanValue`'),
> TimestampValue string OPTIONS (NAMEINSOURCE '`smalla`.`TimestampValue`'),
> ByteNum integer OPTIONS (NAMEINSOURCE '`smalla`.`ByteNum`'),
> StringNum string OPTIONS (NAMEINSOURCE '`smalla`.`StringNum`'),
> TimeValue string OPTIONS (NAMEINSOURCE '`smalla`.`TimeValue`'),
> IntNum integer OPTIONS (NAMEINSOURCE '`smalla`.`IntNum`')
> ) OPTIONS (NAMEINSOURCE '`smalla`', UPDATABLE FALSE, "teiid_couchbase:ISARRAYTABLE" 'false', "teiid_couchbase:NAMEDTYPEPAIR" '`type`:''SmallA''');
> -- view model
> CREATE VIEW SmallA (
> IntKey integer PRIMARY KEY,
> StringKey string,
> IntNum integer,
> StringNum string,
> FloatNum float,
> LongNum long,
> DoubleNum double,
> ByteNum byte,
> DateValue date,
> TimeValue time,
> TimestampValue timestamp,
> BooleanValue boolean,
> CharValue char(1),
> ShortValue short,
> BigIntegerValue biginteger,
> BigDecimalValue bigdecimal,
> ObjectValue object)
> AS
> SELECT
> IntKey, StringKey, IntNum, StringNum, convert(FloatNum, float) AS FloatNum, convert(LongNum, long) AS LongNum,
> convert(DoubleNum, double) AS DoubleNum, convert(ByteNum, byte) AS ByteNum, convert(DateValue, date) AS DateValue,
> convert(TimeValue, time) AS TimeValue, convert(TimestampValue, timestamp) AS TimstampValue, BooleanValue,
> convert(CharValue, char) AS CharValue, convert(ShortValue, short) AS ShortValue, convert(BigIntegerValue, biginteger) AS BigIntegerValue,
> convert(BigDecimalValue, bigdecimal) AS BigDecimalValue, convert(ObjectValue, object) AS ObjectValue
> FROM
> Couchbase.SmallA;
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 7 months
[JBoss JIRA] (TEIID-4931) No Deployed Virtual Databases on console
by Pedro Inácio (JIRA)
Pedro Inácio created TEIID-4931:
-----------------------------------
Summary: No Deployed Virtual Databases on console
Key: TEIID-4931
URL: https://issues.jboss.org/browse/TEIID-4931
Project: Teiid
Issue Type: Bug
Affects Versions: 9.2.3
Environment: * Wildfly 10
* Teiid Server 9.2.3
Reporter: Pedro Inácio
Assignee: Steven Hawkins
Attachments: image-2017-05-24-17-24-08-386.png
After several deploys/undeploys of several VDBs, no VDB is listed any longer on console (Deployed Virtual Databases), although VDBs are effectively deployed.
On logs:
2017-05-24 16:17:49,223 INFO [org.teiid.RUNTIME.VDBLifeCycleListener] (Worker2_async-teiid-threads2) TEIID40003 VDB NetSuiteMappingVDB.1 is set to ACTIVE
2017-05-24 16:17:49,271 INFO [org.teiid.RUNTIME.VDBLifeCycleListener] (Worker0_async-teiid-threads0) TEIID40003 VDB CerillionVDB.1 is set to ACTIVE
2017-05-24 16:17:50,187 INFO [org.teiid.RUNTIME.VDBLifeCycleListener] (Worker3_async-teiid-threads3) TEIID40003 VDB SalesForceVDB.1 is set to ACTIVE
2017-05-24 16:17:50,609 INFO [org.teiid.RUNTIME.VDBLifeCycleListener] (Worker4_async-teiid-threads4) TEIID40003 VDB BillingVDB.1 is set to ACTIVE
2017-05-24 16:17:52,012 INFO [org.teiid.RUNTIME.VDBLifeCycleListener] (Worker3_async-teiid-threads5) TEIID40003 VDB CustomerVDB.1 is set to ACTIVE
2017-05-24 16:18:26,238 INFO [org.teiid.RUNTIME.VDBLifeCycleListener] (Worker1_async-teiid-threads1) TEIID40003 VDB NetSuiteVDB.1 is set to ACTIVE
2017-05-24 16:18:26,584 INFO [org.teiid.RUNTIME.VDBLifeCycleListener] (Worker1_async-teiid-threads6) TEIID40003 VDB ReferenceDataVDB.1 is set to ACTIVE
2017-05-24 16:18:27,115 INFO [org.teiid.RUNTIME.VDBLifeCycleListener] (Worker1_async-teiid-threads7) TEIID40003 VDB FinanceVDB.1 is set to ACTIVE
On console.
!image-2017-05-24-17-24-08-386.png|thumbnail!
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 7 months
[JBoss JIRA] (TEIID-4928) Couchbase - NAMEINSOURCE required for all the columns and tables
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4928?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-4928:
---------------------------------------
> How is it compatible? If NAMEINSOURCE is not defined for column, generated N1QL is missing back quotes (`) around ShortValue which, from my testing, does not work.
>From the Couchbase documentation it appears that it should be compatible. Can you provide more details, like the exception, from a failing case?
> In fact, after talking with other QE we would not recommend using NATIVE metadata for Couchbase.
Is the central qualm with the sample size? Perhaps it would be possible to provide N1QL queries to pull a representative docs in addition to or instead of limit based sampling.
> Do you think how can we do some enhance to make this more clear?
A you saying that we'll need more documentation on how to define the metadata manually? Or are you suggesting that we should reuse the simba schema tools?
> Couchbase - NAMEINSOURCE required for all the columns and tables
> ----------------------------------------------------------------
>
> Key: TEIID-4928
> URL: https://issues.jboss.org/browse/TEIID-4928
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 9.3
> Reporter: Juraj Duráni
> Assignee: Kylin Soong
>
> Option *NAMEINSOURCE* is de facto required for all the columns and tables. If it is not present then:
> # column name in source query is not enclosed in back quotes - e.g. *`$cb_t1`.ShortValue* instead of *`$cb_t1`.`ShortValue`*
> # name of the table is not added to the source query - e.g. *SELECT ... FROM null `$cb_t1` LET ... WHERE ...* instead of *SELECT ... FROM `smalla` `$cb_t1` LET ... WHERE ...*
> This should work OOB without need to add NAMEINSOURCE option. Teiid should automatically translate column name from e.g. *MyColumn* to *`MyColumn`* if option is not set. Same with name of the table.
> In case of table I think this is more serious as it does not even try name of the table but supplies *null* to the query
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 7 months
[JBoss JIRA] (TEIID-4928) Couchbase - NAMEINSOURCE required for all the columns and tables
by Juraj Duráni (JIRA)
[ https://issues.jboss.org/browse/TEIID-4928?page=com.atlassian.jira.plugin... ]
Juraj Duráni edited comment on TEIID-4928 at 5/24/17 8:24 AM:
--------------------------------------------------------------
[~kylin]
>> This for compatible with N1QL reference...
How is it compatible? If _NAMEINSOURCE_ is not defined for column, generated N1QL is missing back quotes \(`\) around _ShortValue_ which, from my testing, does not work.
>> Yes, this is default design pattern, not that, the couchbase server don't have any schema...
Not adding table name to N1QL is a default design pattern?
I think I am not confused about converting SQL to N1QL. What I am worried about is *...FROM null...* in generated N1QL if _NAMEINSOURCE_ is not defined.
>> I think it's not possible to pass a null,...
Obviously it is.
>> Also It's not recommend to define the table by your self,...
Not recommended does not mean not supported.
Defining DDL metadata in source mode has some advantages over NATIVE metadata. Moreover, what if one bucket contains documents with more than one "schema"? How can you be so sure that you will fetch enough documents to infer all related schemas? Should user set *importer.sampleSize* property to 1,000,000? Or even more? What is Teiid's "oracle" according to which you fetch documents from Couchbase?
If you let user define her/his own schema, you will avoid user's frustration of Teiid not being able to infer proper schemas/tables from sample documents. And of course, this should be as simple as possible. Without requiring user to define any of OPTIONS.
In fact, after talking with other QE we would not recommend using NATIVE metadata for Couchbase.
was (Author: jdurani):
[~kylin]
>> This for compatible with N1QL reference...
How is it compatible? If _NAMEINSOURCE _is not defined for column, generated N1QL is missing back quotes \(`\) around _ShortValue_ which, from my testing, does not work.
>> Yes, this is default design pattern, not that, the couchbase server don't have any schema...
Not adding table name to N1QL is a default design pattern?
I think I am not confused about converting SQL to N1QL. What I am worried about is *...FROM null...* in generated N1QL if _NAMEINSOURCE_ is not defined.
>> I think it's not possible to pass a null,...
Obviously it is.
>> Also It's not recommend to define the table by your self,...
Not recommended does not mean not supported.
Defining DDL metadata in source mode has some advantages over NATIVE metadata. Moreover, what if one bucket contains documents with more than one "schema"? How can you be so sure that you will fetch enough documents to infer all related schemas? Should user set *importer.sampleSize* property to 1,000,000? Or even more? What is Teiid's "oracle" according to which you fetch documents from Couchbase?
If you let user define her/his own schema, you will avoid user's frustration of Teiid not being able to infer proper schemas/tables from sample documents. And of course, this should be as simple as possible. Without requiring user to define any of OPTIONS.
In fact, after talking with other QE we would not recommend using NATIVE metadata for Couchbase.
> Couchbase - NAMEINSOURCE required for all the columns and tables
> ----------------------------------------------------------------
>
> Key: TEIID-4928
> URL: https://issues.jboss.org/browse/TEIID-4928
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 9.3
> Reporter: Juraj Duráni
> Assignee: Kylin Soong
>
> Option *NAMEINSOURCE* is de facto required for all the columns and tables. If it is not present then:
> # column name in source query is not enclosed in back quotes - e.g. *`$cb_t1`.ShortValue* instead of *`$cb_t1`.`ShortValue`*
> # name of the table is not added to the source query - e.g. *SELECT ... FROM null `$cb_t1` LET ... WHERE ...* instead of *SELECT ... FROM `smalla` `$cb_t1` LET ... WHERE ...*
> This should work OOB without need to add NAMEINSOURCE option. Teiid should automatically translate column name from e.g. *MyColumn* to *`MyColumn`* if option is not set. Same with name of the table.
> In case of table I think this is more serious as it does not even try name of the table but supplies *null* to the query
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 7 months