[JBoss JIRA] (TEIID-5042) Couchbase supported data types restriction issues
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5042?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-5042:
---------------------------------------
> Float is not supported (in fact left out of the insert even though explicitly being inserted into), but double is.
That looks to be a bug in the CouchbaseExecutionFactory.setValue method. I'll address that with this issue.
> In Couchbase docs there is only type NUMBERS. Why does double fit that description and float doesn't?
Several number types are supported - int, long, double, bigdecimal, and biginteger - by couchbase, but json just has a general number type so it's up to couchbase how that is mapped.
> Couchbase supported data types restriction issues
> -------------------------------------------------
>
> Key: TEIID-5042
> URL: https://issues.jboss.org/browse/TEIID-5042
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.12.x-6.4
> Reporter: Jan Stastny
> Assignee: Steven Hawkins
>
> # Couchbase translator supports only subset of supported datatypes in Teiid:
> ??All supported type in a Couchbase JSON item: null, String, Integer, Long, Double, BigInteger, BigDecimal, JsonObject, JsonArray??
> #* this is too restrictive, why not float? time/date/timestamp? And let the translator to handle conversion in both directions.
> # Couchbase leaves out silently the columns with unsupported data types in INSERTs.
> #* See the example in bottom of description.
> # documentID is (in code) considered String. This is too restrictive. In the code there might be String.valueOf() instead of (String) cast (N1QLUpdateVisitor.java:139). It would help users to use their primary keys (from existing datasets) as document ids in couchbase.
> Example:
> For a source model DDL:
> {code:sql|title=DDL}
> CREATE FOREIGN TABLE SmallA (
> documentID string PRIMARY KEY,
> type string OPTIONS (NAMEINSOURCE '`type`'),
> FloatNum float OPTIONS (NAMEINSOURCE '`FloatNum`'),
> BigIntegerValue biginteger OPTIONS (NAMEINSOURCE '`BigIntegerValue`'),
> StringKey string OPTIONS (NAMEINSOURCE '`StringKey`'),
> CharValue string OPTIONS (NAMEINSOURCE '`CharValue`'),
> LongNum long OPTIONS (NAMEINSOURCE '`LongNum`'),
> DoubleNum double OPTIONS (NAMEINSOURCE '`DoubleNum`'),
> ObjectValue string OPTIONS (NAMEINSOURCE '`ObjectValue`'),
> ShortValue integer OPTIONS (NAMEINSOURCE '`ShortValue`'),
> BigDecimalValue bigdecimal OPTIONS (NAMEINSOURCE '`BigDecimalValue`'),
> DateValue string OPTIONS (NAMEINSOURCE '`DateValue`'),
> BooleanValue boolean OPTIONS (NAMEINSOURCE '`BooleanValue`'),
> TimestampValue string OPTIONS (NAMEINSOURCE '`TimestampValue`'),
> ByteNum integer OPTIONS (NAMEINSOURCE '`ByteNum`'),
> StringNum string OPTIONS (NAMEINSOURCE '`StringNum`'),
> TimeValue string OPTIONS (NAMEINSOURCE '`TimeValue`'),
> IntNum integer OPTIONS (NAMEINSOURCE '`IntNum`')
> ) OPTIONS (NAMEINSOURCE '`dvqe_crud`', UPDATABLE TRUE, "teiid_couchbase:ISARRAYTABLE" 'false', "teiid_couchbase:NAMEDTYPEPAIR" '`type`:''nullSmallA''');
> {code}
> and query
> {code:sql|title=INSERT query}
> INSERT INTO Source.SmallA (documentID, StringKey, IntNum, StringNum,DoubleNum, FloatNum,LongNum) VALUES (4, '1', 1, '1',CAST(5.00 AS double),CAST(5.00 AS float), 5);
> {code}
> there is incorrect source command being pushed to couchbase. The float column is not being pushed at all, no warning appears.
> {code:title=teiid-command.log}
> 14:49:37,061 INFO [org.teiid.COMMAND_LOG] (New I/O worker #2) ReyS5USI/FcT START USER COMMAND: startTime=2017-08-29 14:49:37.061 requestID=ReyS5USI/FcT.9 txID=null sessionID=ReyS5USI/FcT applicationName=JDBC principal=user@teiid-security vdbName=couchbase_crud vdbVersion=1 sql=INSERT INTO Source.SmallA (documentID, StringKey, IntNum, StringNum,DoubleNum, FloatNum,LongNum) VALUES (4, '1', 1, '1',CAST(5.00 AS double),CAST(5.00 AS float), 5)
> 14:49:38,375 DEBUG [org.teiid.COMMAND_LOG] (Worker32_QueryProcessorQueue150) ReyS5USI/FcT START DATA SRC COMMAND: startTime=2017-08-29 14:49:38.375 requestID=ReyS5USI/FcT.9 sourceCommandID=0 executionID=27 txID=null modelName=Source translatorName=couchbase sessionID=ReyS5USI/FcT principal=user@teiid-security sql=INSERT INTO Source.SmallA (documentID, StringKey, IntNum, StringNum, DoubleNum, FloatNum, LongNum) VALUES ('4', '1', 1, '1', 5.0, 5.0, 5)
> 14:49:38,380 DEBUG [org.teiid.COMMAND_LOG] (Worker32_QueryProcessorQueue150) ReyS5USI/FcT SOURCE SRC COMMAND: endTime=2017-08-29 14:49:38.38 requestID=ReyS5USI/FcT.9 sourceCommandID=0 executionID=27 txID=null modelName=Source translatorName=couchbase sessionID=ReyS5USI/FcT principal=user@teiid-security sourceCommand=[INSERT INTO `dvqe_crud` (KEY, VALUE) VALUES ('4', {"DoubleNum":5.0,"IntNum":1,"LongNum":5,"StringNum":"1","StringKey":"1"}) RETURNING META(`dvqe_crud`).id AS PK]
> 14:49:38,962 DEBUG [org.teiid.COMMAND_LOG] (Worker31_QueryProcessorQueue151) ReyS5USI/FcT END SRC COMMAND: endTime=2017-08-29 14:49:38.962 requestID=ReyS5USI/FcT.9 sourceCommandID=0 executionID=27 txID=null modelName=Source translatorName=couchbase sessionID=ReyS5USI/FcT principal=user@teiid-security finalRowCount=1 cpuTime(ns)=12306369
> 14:49:38,966 INFO [org.teiid.COMMAND_LOG] (Worker31_QueryProcessorQueue152) ReyS5USI/FcT END USER COMMAND: endTime=2017-08-29 14:49:38.966 requestID=ReyS5USI/FcT.9 txID=null sessionID=ReyS5USI/FcT principal=user@teiid-security vdbName=couchbase_crud vdbVersion=1 finalRowCount=1
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
6 years, 8 months
[JBoss JIRA] (TEIID-5039) Couchbase document type definition for a table
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5039?page=com.atlassian.jira.plugin... ]
Work on TEIID-5039 started by Steven Hawkins.
---------------------------------------------
> Couchbase document type definition for a table
> ----------------------------------------------
>
> Key: TEIID-5039
> URL: https://issues.jboss.org/browse/TEIID-5039
> Project: Teiid
> Issue Type: Enhancement
> Reporter: Jan Stastny
> Assignee: Steven Hawkins
> Priority: Blocker
>
> If a table is tight to a single document type, there shouldn't be need for explicit type column assignment when inserting into that table.
> With a vdb:
> {code:sql|title=DDL}
> CREATE FOREIGN TABLE SmallA (
> documentID string PRIMARY KEY,
> type string OPTIONS (NAMEINSOURCE '`type`'),
> FloatNum float OPTIONS (NAMEINSOURCE '`FloatNum`'),
> BigIntegerValue biginteger OPTIONS (NAMEINSOURCE '`BigIntegerValue`'),
> StringKey string OPTIONS (NAMEINSOURCE '`StringKey`'),
> CharValue string OPTIONS (NAMEINSOURCE '`CharValue`'),
> LongNum long OPTIONS (NAMEINSOURCE '`LongNum`'),
> DoubleNum double OPTIONS (NAMEINSOURCE '`DoubleNum`'),
> ObjectValue string OPTIONS (NAMEINSOURCE '`ObjectValue`'),
> ShortValue integer OPTIONS (NAMEINSOURCE '`ShortValue`'),
> BigDecimalValue bigdecimal OPTIONS (NAMEINSOURCE '`BigDecimalValue`'),
> DateValue string OPTIONS (NAMEINSOURCE '`DateValue`'),
> BooleanValue boolean OPTIONS (NAMEINSOURCE '`BooleanValue`'),
> TimestampValue string OPTIONS (NAMEINSOURCE '`TimestampValue`'),
> ByteNum integer OPTIONS (NAMEINSOURCE '`ByteNum`'),
> StringNum string OPTIONS (NAMEINSOURCE '`StringNum`'),
> TimeValue string OPTIONS (NAMEINSOURCE '`TimeValue`'),
> IntNum integer OPTIONS (NAMEINSOURCE '`IntNum`')
> ) OPTIONS (NAMEINSOURCE '`dvqe_crud`', UPDATABLE TRUE, "teiid_couchbase:ISARRAYTABLE" 'false', "teiid_couchbase:NAMEDTYPEPAIR" '`type`:''SmallA''');
> {code}
> I'd like to insert using such query:
> {code:sql|title=query}
> INSERT INTO Source.SmallA (documentID, StringKey, IntNum, StringNum) VALUES (1, '1', 1, '1');
> {code}
> And then getting the value back using
> {code:sql|title=query_select}
> SELECT * FROM Source.SmallA
> {code}
> to see the row I inserted.
> Everything without the need to explicitly set 'type' column for the insert query.
> There is missing 1-to-1 relation between a defined FOREIGN table and a document type in couchbase. (When I INSERT into a table in Teiid, there should be clear distiction about what type of document I am inserting and to what keyspace). Possibly the OPTION "teiid_couchbase:NAMEDTYPEPAIR" can serve this purpose, if it works that way for selects, why not for inserts.
> I see this as an usability blocker, when user has to set 'type' explicitly in every single insert.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
6 years, 8 months
[JBoss JIRA] (TEIID-5042) Couchbase supported data types restriction issues
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5042?page=com.atlassian.jira.plugin... ]
Work on TEIID-5042 started by Steven Hawkins.
---------------------------------------------
> Couchbase supported data types restriction issues
> -------------------------------------------------
>
> Key: TEIID-5042
> URL: https://issues.jboss.org/browse/TEIID-5042
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.12.x-6.4
> Reporter: Jan Stastny
> Assignee: Steven Hawkins
>
> # Couchbase translator supports only subset of supported datatypes in Teiid:
> ??All supported type in a Couchbase JSON item: null, String, Integer, Long, Double, BigInteger, BigDecimal, JsonObject, JsonArray??
> #* this is too restrictive, why not float? time/date/timestamp? And let the translator to handle conversion in both directions.
> # Couchbase leaves out silently the columns with unsupported data types in INSERTs.
> #* See the example in bottom of description.
> # documentID is (in code) considered String. This is too restrictive. In the code there might be String.valueOf() instead of (String) cast (N1QLUpdateVisitor.java:139). It would help users to use their primary keys (from existing datasets) as document ids in couchbase.
> Example:
> For a source model DDL:
> {code:sql|title=DDL}
> CREATE FOREIGN TABLE SmallA (
> documentID string PRIMARY KEY,
> type string OPTIONS (NAMEINSOURCE '`type`'),
> FloatNum float OPTIONS (NAMEINSOURCE '`FloatNum`'),
> BigIntegerValue biginteger OPTIONS (NAMEINSOURCE '`BigIntegerValue`'),
> StringKey string OPTIONS (NAMEINSOURCE '`StringKey`'),
> CharValue string OPTIONS (NAMEINSOURCE '`CharValue`'),
> LongNum long OPTIONS (NAMEINSOURCE '`LongNum`'),
> DoubleNum double OPTIONS (NAMEINSOURCE '`DoubleNum`'),
> ObjectValue string OPTIONS (NAMEINSOURCE '`ObjectValue`'),
> ShortValue integer OPTIONS (NAMEINSOURCE '`ShortValue`'),
> BigDecimalValue bigdecimal OPTIONS (NAMEINSOURCE '`BigDecimalValue`'),
> DateValue string OPTIONS (NAMEINSOURCE '`DateValue`'),
> BooleanValue boolean OPTIONS (NAMEINSOURCE '`BooleanValue`'),
> TimestampValue string OPTIONS (NAMEINSOURCE '`TimestampValue`'),
> ByteNum integer OPTIONS (NAMEINSOURCE '`ByteNum`'),
> StringNum string OPTIONS (NAMEINSOURCE '`StringNum`'),
> TimeValue string OPTIONS (NAMEINSOURCE '`TimeValue`'),
> IntNum integer OPTIONS (NAMEINSOURCE '`IntNum`')
> ) OPTIONS (NAMEINSOURCE '`dvqe_crud`', UPDATABLE TRUE, "teiid_couchbase:ISARRAYTABLE" 'false', "teiid_couchbase:NAMEDTYPEPAIR" '`type`:''nullSmallA''');
> {code}
> and query
> {code:sql|title=INSERT query}
> INSERT INTO Source.SmallA (documentID, StringKey, IntNum, StringNum,DoubleNum, FloatNum,LongNum) VALUES (4, '1', 1, '1',CAST(5.00 AS double),CAST(5.00 AS float), 5);
> {code}
> there is incorrect source command being pushed to couchbase. The float column is not being pushed at all, no warning appears.
> {code:title=teiid-command.log}
> 14:49:37,061 INFO [org.teiid.COMMAND_LOG] (New I/O worker #2) ReyS5USI/FcT START USER COMMAND: startTime=2017-08-29 14:49:37.061 requestID=ReyS5USI/FcT.9 txID=null sessionID=ReyS5USI/FcT applicationName=JDBC principal=user@teiid-security vdbName=couchbase_crud vdbVersion=1 sql=INSERT INTO Source.SmallA (documentID, StringKey, IntNum, StringNum,DoubleNum, FloatNum,LongNum) VALUES (4, '1', 1, '1',CAST(5.00 AS double),CAST(5.00 AS float), 5)
> 14:49:38,375 DEBUG [org.teiid.COMMAND_LOG] (Worker32_QueryProcessorQueue150) ReyS5USI/FcT START DATA SRC COMMAND: startTime=2017-08-29 14:49:38.375 requestID=ReyS5USI/FcT.9 sourceCommandID=0 executionID=27 txID=null modelName=Source translatorName=couchbase sessionID=ReyS5USI/FcT principal=user@teiid-security sql=INSERT INTO Source.SmallA (documentID, StringKey, IntNum, StringNum, DoubleNum, FloatNum, LongNum) VALUES ('4', '1', 1, '1', 5.0, 5.0, 5)
> 14:49:38,380 DEBUG [org.teiid.COMMAND_LOG] (Worker32_QueryProcessorQueue150) ReyS5USI/FcT SOURCE SRC COMMAND: endTime=2017-08-29 14:49:38.38 requestID=ReyS5USI/FcT.9 sourceCommandID=0 executionID=27 txID=null modelName=Source translatorName=couchbase sessionID=ReyS5USI/FcT principal=user@teiid-security sourceCommand=[INSERT INTO `dvqe_crud` (KEY, VALUE) VALUES ('4', {"DoubleNum":5.0,"IntNum":1,"LongNum":5,"StringNum":"1","StringKey":"1"}) RETURNING META(`dvqe_crud`).id AS PK]
> 14:49:38,962 DEBUG [org.teiid.COMMAND_LOG] (Worker31_QueryProcessorQueue151) ReyS5USI/FcT END SRC COMMAND: endTime=2017-08-29 14:49:38.962 requestID=ReyS5USI/FcT.9 sourceCommandID=0 executionID=27 txID=null modelName=Source translatorName=couchbase sessionID=ReyS5USI/FcT principal=user@teiid-security finalRowCount=1 cpuTime(ns)=12306369
> 14:49:38,966 INFO [org.teiid.COMMAND_LOG] (Worker31_QueryProcessorQueue152) ReyS5USI/FcT END USER COMMAND: endTime=2017-08-29 14:49:38.966 requestID=ReyS5USI/FcT.9 txID=null sessionID=ReyS5USI/FcT principal=user@teiid-security vdbName=couchbase_crud vdbVersion=1 finalRowCount=1
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
6 years, 8 months
[JBoss JIRA] (TEIID-5038) Couchbase importer.sampleKeyspaces not resctricting document types imported
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5038?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-5038.
-----------------------------------
Resolution: Duplicate Issue
This is effectively a request for TEIID-4933 to be included in 6.4. I'll add that to the pull request.
> Couchbase importer.sampleKeyspaces not resctricting document types imported
> ---------------------------------------------------------------------------
>
> Key: TEIID-5038
> URL: https://issues.jboss.org/browse/TEIID-5038
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.12.x-6.4
> Reporter: Jan Stastny
> Assignee: Steven Hawkins
> Priority: Critical
>
> A vdb with importer.sampleKeyspaces property doesn't restrict the keyspaces imported. From the docs:
> ??A comma-separate list of the keyspace names, used to fine-grained control which keyspaces should be mapped, by default map all keyspaces.??
> I have two keyspaces:
> * dvqe_small
> * dvqe_other
> The dvqe_small one contains ONLY types:
> * SmallA
> * SmallB
> But this vdb:
> {code:xml|title=vdb with sampleKeyspaces}
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <vdb name="couchbase_crud" version="1">
> <model name="Source" type="PHYSICAL" visible="true">
> <property name="importer.typeNameList" value="`dvqe_small`:`type`,`dvqe_other`:`type`"/>
> <property name="importer.sampleKeyspaces" value="`dvqe_small`"/>
> <source name="Source" connection-jndi-name="java:/couchbase_crud" translator-name="couchbase"/>
> </model>
> </vdb>
> {code}
> is imported the same as this one:
> {code:xml|title=vdb without sampleKeyspaces}
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <vdb name="couchbase_crud" version="1">
> <model name="Source" type="PHYSICAL" visible="true">
> <property name="importer.typeNameList" value="`dvqe_small`:`type`,`dvqe_other`:`type`"/>
> <source name="Source" connection-jndi-name="java:/couchbase_crud" translator-name="couchbase"/>
> </model>
> </vdb>
> {code}
> With resulting DDL containing OTHER types than those defined in dvqe_small keyspace:
> {code:sql|title=import result}
> SET NAMESPACE 'http://www.teiid.org/translator/couchbase/2017' AS teiid_couchbase;
> CREATE FOREIGN TABLE dvqe_crud (
> documentID string,
> CONSTRAINT PK0 PRIMARY KEY(documentID)
> ) OPTIONS (NAMEINSOURCE '`dvqe_crud`', UPDATABLE TRUE, "teiid_couchbase:ISARRAYTABLE" 'false');
> CREATE FOREIGN TABLE LargeA (
> documentID string,
> BigDecimalValue integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`BigDecimalValue`'),
> BigIntegerValue integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`BigIntegerValue`'),
> BooleanValue boolean OPTIONS (NAMEINSOURCE '`dvqe_other`.`BooleanValue`'),
> ByteNum integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`ByteNum`'),
> CharValue string OPTIONS (NAMEINSOURCE '`dvqe_other`.`CharValue`'),
> DateValue string OPTIONS (NAMEINSOURCE '`dvqe_other`.`DateValue`'),
> DoubleNum integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`DoubleNum`'),
> FloatNum integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`FloatNum`'),
> IntKey integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`IntKey`'),
> LongNum integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`LongNum`'),
> ObjectValue string OPTIONS (NAMEINSOURCE '`dvqe_other`.`ObjectValue`'),
> ShortValue integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`ShortValue`'),
> StringKey string OPTIONS (NAMEINSOURCE '`dvqe_other`.`StringKey`'),
> StringNum string OPTIONS (NAMEINSOURCE '`dvqe_other`.`StringNum`'),
> TimeValue string OPTIONS (NAMEINSOURCE '`dvqe_other`.`TimeValue`'),
> TimestampValue string OPTIONS (NAMEINSOURCE '`dvqe_other`.`TimestampValue`'),
> type string OPTIONS (NAMEINSOURCE '`dvqe_other`.`type`'),
> IntNum integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`IntNum`'),
> CONSTRAINT PK0 PRIMARY KEY(documentID)
> ) OPTIONS (NAMEINSOURCE '`dvqe_other`', UPDATABLE TRUE, "teiid_couchbase:ISARRAYTABLE" 'false', "teiid_couchbase:NAMEDTYPEPAIR" '`type`:''LargeA''');
> CREATE FOREIGN TABLE LargeB (
> documentID string,
> BigDecimalValue integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`BigDecimalValue`'),
> BigIntegerValue integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`BigIntegerValue`'),
> BooleanValue boolean OPTIONS (NAMEINSOURCE '`dvqe_other`.`BooleanValue`'),
> ByteNum integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`ByteNum`'),
> CharValue string OPTIONS (NAMEINSOURCE '`dvqe_other`.`CharValue`'),
> DateValue string OPTIONS (NAMEINSOURCE '`dvqe_other`.`DateValue`'),
> DoubleNum integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`DoubleNum`'),
> FloatNum integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`FloatNum`'),
> IntKey integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`IntKey`'),
> LongNum integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`LongNum`'),
> ObjectValue string OPTIONS (NAMEINSOURCE '`dvqe_other`.`ObjectValue`'),
> ShortValue integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`ShortValue`'),
> StringKey string OPTIONS (NAMEINSOURCE '`dvqe_other`.`StringKey`'),
> StringNum string OPTIONS (NAMEINSOURCE '`dvqe_other`.`StringNum`'),
> TimeValue string OPTIONS (NAMEINSOURCE '`dvqe_other`.`TimeValue`'),
> TimestampValue string OPTIONS (NAMEINSOURCE '`dvqe_other`.`TimestampValue`'),
> type string OPTIONS (NAMEINSOURCE '`dvqe_other`.`type`'),
> IntNum integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`IntNum`'),
> CONSTRAINT PK0 PRIMARY KEY(documentID)
> ) OPTIONS (NAMEINSOURCE '`dvqe_other`', UPDATABLE TRUE, "teiid_couchbase:ISARRAYTABLE" 'false', "teiid_couchbase:NAMEDTYPEPAIR" '`type`:''LargeB''');
> CREATE FOREIGN TABLE MediumA (
> documentID string,
> BigDecimalValue integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`BigDecimalValue`'),
> BigIntegerValue integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`BigIntegerValue`'),
> BooleanValue boolean OPTIONS (NAMEINSOURCE '`dvqe_other`.`BooleanValue`'),
> ByteNum integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`ByteNum`'),
> CharValue string OPTIONS (NAMEINSOURCE '`dvqe_other`.`CharValue`'),
> DateValue string OPTIONS (NAMEINSOURCE '`dvqe_other`.`DateValue`'),
> DoubleNum integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`DoubleNum`'),
> FloatNum integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`FloatNum`'),
> IntKey integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`IntKey`'),
> LongNum integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`LongNum`'),
> ObjectValue string OPTIONS (NAMEINSOURCE '`dvqe_other`.`ObjectValue`'),
> ShortValue integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`ShortValue`'),
> StringKey string OPTIONS (NAMEINSOURCE '`dvqe_other`.`StringKey`'),
> StringNum string OPTIONS (NAMEINSOURCE '`dvqe_other`.`StringNum`'),
> TimeValue string OPTIONS (NAMEINSOURCE '`dvqe_other`.`TimeValue`'),
> TimestampValue string OPTIONS (NAMEINSOURCE '`dvqe_other`.`TimestampValue`'),
> type string OPTIONS (NAMEINSOURCE '`dvqe_other`.`type`'),
> IntNum integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`IntNum`'),
> CONSTRAINT PK0 PRIMARY KEY(documentID)
> ) OPTIONS (NAMEINSOURCE '`dvqe_other`', UPDATABLE TRUE, "teiid_couchbase:ISARRAYTABLE" 'false', "teiid_couchbase:NAMEDTYPEPAIR" '`type`:''MediumA''');
> CREATE FOREIGN TABLE MediumB (
> documentID string,
> BigDecimalValue integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`BigDecimalValue`'),
> BigIntegerValue integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`BigIntegerValue`'),
> BooleanValue boolean OPTIONS (NAMEINSOURCE '`dvqe_other`.`BooleanValue`'),
> ByteNum integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`ByteNum`'),
> CharValue string OPTIONS (NAMEINSOURCE '`dvqe_other`.`CharValue`'),
> DateValue string OPTIONS (NAMEINSOURCE '`dvqe_other`.`DateValue`'),
> DoubleNum integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`DoubleNum`'),
> FloatNum integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`FloatNum`'),
> IntKey integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`IntKey`'),
> LongNum integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`LongNum`'),
> ObjectValue string OPTIONS (NAMEINSOURCE '`dvqe_other`.`ObjectValue`'),
> ShortValue integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`ShortValue`'),
> StringKey string OPTIONS (NAMEINSOURCE '`dvqe_other`.`StringKey`'),
> StringNum string OPTIONS (NAMEINSOURCE '`dvqe_other`.`StringNum`'),
> TimeValue string OPTIONS (NAMEINSOURCE '`dvqe_other`.`TimeValue`'),
> TimestampValue string OPTIONS (NAMEINSOURCE '`dvqe_other`.`TimestampValue`'),
> type string OPTIONS (NAMEINSOURCE '`dvqe_other`.`type`'),
> IntNum integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`IntNum`'),
> CONSTRAINT PK0 PRIMARY KEY(documentID)
> ) OPTIONS (NAMEINSOURCE '`dvqe_other`', UPDATABLE TRUE, "teiid_couchbase:ISARRAYTABLE" 'false', "teiid_couchbase:NAMEDTYPEPAIR" '`type`:''MediumB''');
> CREATE FOREIGN TABLE SmallA (
> documentID string,
> BigDecimalValue integer OPTIONS (NAMEINSOURCE '`dvqe_small`.`BigDecimalValue`'),
> BigIntegerValue integer OPTIONS (NAMEINSOURCE '`dvqe_small`.`BigIntegerValue`'),
> BooleanValue boolean OPTIONS (NAMEINSOURCE '`dvqe_small`.`BooleanValue`'),
> ByteNum integer OPTIONS (NAMEINSOURCE '`dvqe_small`.`ByteNum`'),
> CharValue string OPTIONS (NAMEINSOURCE '`dvqe_small`.`CharValue`'),
> DateValue string OPTIONS (NAMEINSOURCE '`dvqe_small`.`DateValue`'),
> DoubleNum integer OPTIONS (NAMEINSOURCE '`dvqe_small`.`DoubleNum`'),
> FloatNum integer OPTIONS (NAMEINSOURCE '`dvqe_small`.`FloatNum`'),
> IntKey integer OPTIONS (NAMEINSOURCE '`dvqe_small`.`IntKey`'),
> LongNum integer OPTIONS (NAMEINSOURCE '`dvqe_small`.`LongNum`'),
> ObjectValue string OPTIONS (NAMEINSOURCE '`dvqe_small`.`ObjectValue`'),
> ShortValue integer OPTIONS (NAMEINSOURCE '`dvqe_small`.`ShortValue`'),
> StringKey string OPTIONS (NAMEINSOURCE '`dvqe_small`.`StringKey`'),
> StringNum string OPTIONS (NAMEINSOURCE '`dvqe_small`.`StringNum`'),
> TimeValue string OPTIONS (NAMEINSOURCE '`dvqe_small`.`TimeValue`'),
> TimestampValue string OPTIONS (NAMEINSOURCE '`dvqe_small`.`TimestampValue`'),
> type string OPTIONS (NAMEINSOURCE '`dvqe_small`.`type`'),
> IntNum integer OPTIONS (NAMEINSOURCE '`dvqe_small`.`IntNum`'),
> CONSTRAINT PK0 PRIMARY KEY(documentID)
> ) OPTIONS (NAMEINSOURCE '`dvqe_small`', UPDATABLE TRUE, "teiid_couchbase:ISARRAYTABLE" 'false', "teiid_couchbase:NAMEDTYPEPAIR" '`type`:''SmallA''');
> CREATE FOREIGN TABLE SmallB (
> documentID string,
> BigDecimalValue integer OPTIONS (NAMEINSOURCE '`dvqe_small`.`BigDecimalValue`'),
> BigIntegerValue integer OPTIONS (NAMEINSOURCE '`dvqe_small`.`BigIntegerValue`'),
> BooleanValue boolean OPTIONS (NAMEINSOURCE '`dvqe_small`.`BooleanValue`'),
> ByteNum integer OPTIONS (NAMEINSOURCE '`dvqe_small`.`ByteNum`'),
> CharValue string OPTIONS (NAMEINSOURCE '`dvqe_small`.`CharValue`'),
> DateValue string OPTIONS (NAMEINSOURCE '`dvqe_small`.`DateValue`'),
> DoubleNum integer OPTIONS (NAMEINSOURCE '`dvqe_small`.`DoubleNum`'),
> FloatNum integer OPTIONS (NAMEINSOURCE '`dvqe_small`.`FloatNum`'),
> IntKey integer OPTIONS (NAMEINSOURCE '`dvqe_small`.`IntKey`'),
> LongNum integer OPTIONS (NAMEINSOURCE '`dvqe_small`.`LongNum`'),
> ObjectValue string OPTIONS (NAMEINSOURCE '`dvqe_small`.`ObjectValue`'),
> ShortValue integer OPTIONS (NAMEINSOURCE '`dvqe_small`.`ShortValue`'),
> StringKey string OPTIONS (NAMEINSOURCE '`dvqe_small`.`StringKey`'),
> StringNum string OPTIONS (NAMEINSOURCE '`dvqe_small`.`StringNum`'),
> TimeValue string OPTIONS (NAMEINSOURCE '`dvqe_small`.`TimeValue`'),
> TimestampValue string OPTIONS (NAMEINSOURCE '`dvqe_small`.`TimestampValue`'),
> type string OPTIONS (NAMEINSOURCE '`dvqe_small`.`type`'),
> IntNum integer OPTIONS (NAMEINSOURCE '`dvqe_small`.`IntNum`'),
> CONSTRAINT PK0 PRIMARY KEY(documentID)
> ) OPTIONS (NAMEINSOURCE '`dvqe_small`', UPDATABLE TRUE, "teiid_couchbase:ISARRAYTABLE" 'false', "teiid_couchbase:NAMEDTYPEPAIR" '`type`:''SmallB''');
> CREATE FOREIGN PROCEDURE getDocument(IN id string NOT NULL OPTIONS (ANNOTATION 'The document id of what documents to return'), IN keyspace string NOT NULL OPTIONS (ANNOTATION 'The keyspace name used to retrieve the document')) RETURNS TABLE (result blob)
> OPTIONS (ANNOTATION 'Return a json document that match the given document id as BLOB')
> CREATE FOREIGN PROCEDURE getDocuments(IN id string NOT NULL OPTIONS (ANNOTATION 'The document id or SQL like pattern of what documents to return, for example, the ''%'' sign is used to define wildcards (missing letters) both before and after the pattern'), IN keyspace string NOT NULL OPTIONS (ANNOTATION 'The keyspace name used to retrieve the documents')) RETURNS TABLE (result blob)
> OPTIONS (ANNOTATION 'Returns json documents that match the given document id or id pattern as BLOBs')
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
6 years, 8 months
[JBoss JIRA] (TEIID-5026) Add function to transform timestamp into Unix time
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5026?page=com.atlassian.jira.plugin... ]
Steven Hawkins updated TEIID-5026:
----------------------------------
Fix Version/s: 10.0
> Add function to transform timestamp into Unix time
> --------------------------------------------------
>
> Key: TEIID-5026
> URL: https://issues.jboss.org/browse/TEIID-5026
> Project: Teiid
> Issue Type: Feature Request
> Components: Query Engine
> Reporter: Jan Stastny
> Assignee: Steven Hawkins
> Fix For: 10.0
>
>
> Teiid supports function FROM_UNIXTIME as a result of TEIID-248.
> There isn't its reverse counterpart though.
> This is an issue, when there is a data source which doesn't support timestamp/date/time data types:
> * users choose to use long(unix time) in the source
> * by using FROM_UNIXTIME function they transform the long value (unix time) into respective data type value in their virtual model
> * they can read such source.
> * they can't insert/update it as this would require 'INSTEAD OF TRIGGER' with ability to transform timestamp/time/date back to long value - Unix time. This part is missing.
> As an example could serve [MySQL's UNIX_TIMESTAMP|https://dev.mysql.com/doc/refman/5.5/en/date-and-time-func...]
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
6 years, 8 months
[JBoss JIRA] (TEIID-5047) teiid-jboss-admin throw exception in get vdb
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5047?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-5047:
---------------------------------------
What specifically is the admin version and what dmr version is it using? It appears that there is some custom stuff above it.
This does not appear to be happening in the arquillian tests even though type is included in the attributes.
> teiid-jboss-admin throw exception in get vdb
> --------------------------------------------
>
> Key: TEIID-5047
> URL: https://issues.jboss.org/browse/TEIID-5047
> Project: Teiid
> Issue Type: Bug
> Components: AdminApi
> Affects Versions: 8.12.12.6_3
> Environment: * 8.12.5.redhat-8
> Reporter: Kylin Soong
> Assignee: Steven Hawkins
>
> The return result have a type attribute
> {code}
> [standalone@localhost:9999 /] /subsystem=teiid:get-vdb(vdb-name=A1_DG_EPDM,vdb-version=1)
> {
> "outcome" => "success",
> "result" => {
> "type" => OBJECT,
> "vdb-name" => "A1_DG_EPDM",
> "connection-type" => "BY_VERSION",
> "status" => "LOADING",
> "vdb-version" => 1,
> "vdb-description" => "A1 EPDM 大港(10.76.32.26)",
> {code}
> but the VDBMetadataMapper don't consider this, which cause the following exception throw
> {code}
> Exception in thread "main" java.lang.IllegalArgumentException
> at org.jboss.dmr.ModelValue.getChild(ModelValue.java:112)
> at org.jboss.dmr.PropertyModelValue.getChild(PropertyModelValue.java:117)
> at org.jboss.dmr.ModelNode.get(ModelNode.java:856)
> at org.teiid.adminapi.jboss.VDBMetadataMapper.unwrap(VDBMetadataMapper.java:169)
> at org.teiid.adminapi.jboss.VDBMetadataMapper.unwrap(VDBMetadataMapper.java:61)
> at com.cnpc.datavirt.admin.impl.AdminImpl.getList(AdminImpl.java:172)
> at com.cnpc.datavirt.admin.impl.AdminImpl.getDomainAwareList(AdminImpl.java:157)
> at com.cnpc.datavirt.admin.impl.AdminImpl.getVDB(AdminImpl.java:112)
> at com.cnpc.datavirt.admin.sample.Sample.main(Sample.java:13)
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
6 years, 8 months
[JBoss JIRA] (TEIID-5047) teiid-jboss-admin throw exception in get vdb
by Kylin Soong (JIRA)
Kylin Soong created TEIID-5047:
----------------------------------
Summary: teiid-jboss-admin throw exception in get vdb
Key: TEIID-5047
URL: https://issues.jboss.org/browse/TEIID-5047
Project: Teiid
Issue Type: Bug
Components: AdminApi
Affects Versions: 8.12.12.6_3
Environment: * 8.12.5.redhat-8
Reporter: Kylin Soong
Assignee: Steven Hawkins
The return result have a type attribute
{code}
[standalone@localhost:9999 /] /subsystem=teiid:get-vdb(vdb-name=A1_DG_EPDM,vdb-version=1)
{
"outcome" => "success",
"result" => {
"type" => OBJECT,
"vdb-name" => "A1_DG_EPDM",
"connection-type" => "BY_VERSION",
"status" => "LOADING",
"vdb-version" => 1,
"vdb-description" => "A1 EPDM 大港(10.76.32.26)",
{code}
but the VDBMetadataMapper don't consider this, which cause the following exception throw
{code}
Exception in thread "main" java.lang.IllegalArgumentException
at org.jboss.dmr.ModelValue.getChild(ModelValue.java:112)
at org.jboss.dmr.PropertyModelValue.getChild(PropertyModelValue.java:117)
at org.jboss.dmr.ModelNode.get(ModelNode.java:856)
at org.teiid.adminapi.jboss.VDBMetadataMapper.unwrap(VDBMetadataMapper.java:169)
at org.teiid.adminapi.jboss.VDBMetadataMapper.unwrap(VDBMetadataMapper.java:61)
at com.cnpc.datavirt.admin.impl.AdminImpl.getList(AdminImpl.java:172)
at com.cnpc.datavirt.admin.impl.AdminImpl.getDomainAwareList(AdminImpl.java:157)
at com.cnpc.datavirt.admin.impl.AdminImpl.getVDB(AdminImpl.java:112)
at com.cnpc.datavirt.admin.sample.Sample.main(Sample.java:13)
{code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
6 years, 8 months