[JBoss JIRA] (TEIID-4867) Loosen up OData4 URL validation or parsing
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/TEIID-4867?page=com.atlassian.jira.plugin... ]
RH Bugzilla Integration updated TEIID-4867:
-------------------------------------------
Bugzilla References: https://bugzilla.redhat.com/show_bug.cgi?id=1451785, https://bugzilla.redhat.com/show_bug.cgi?id=1446180, https://bugzilla.redhat.com/show_bug.cgi?id=1446201
Bugzilla Update: Perform
> Loosen up OData4 URL validation or parsing
> ------------------------------------------
>
> Key: TEIID-4867
> URL: https://issues.jboss.org/browse/TEIID-4867
> Project: Teiid
> Issue Type: Bug
> Components: OData
> Affects Versions: 8.12.8.6_3
> Environment: JDV 6.3.2
> Windows 7
> Reporter: Steve Tran
> Assignee: Johnathon Lee
> Fix For: 8.12.x-6.4, 8.12.11.6_3
>
>
> I'm accessing my JDV table via OData4 through Salesforce's UI builder. The salesforce engine itself is creating the OData calls, and whenever a $filter is needed with multiple columns, it looks like salesforce pads the column name with a space in front and behind. That'll make the URL look like ...$filter={color:red}%20{color}ColumnA{color:red}%20{color}eq%20123%20and{color:red}%20{color}ColumnB{color:red}%20{color}eq...
> The first space right after the $filter= throws off the JDV engine as it thinks it's a malformed URL - which I guess it is. The thing is when I tested it via the OData2 interface, it accepted it just fine. I'm not sure if the OData4 specifications explicitly state in terms of the URL, so it could be anybody's bug. Perhaps we could make JDV a little more forgiving and trim the spaces after un-URL-encoding the URI.
--
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 Kylin Soong (JIRA)
[ https://issues.jboss.org/browse/TEIID-4928?page=com.atlassian.jira.plugin... ]
Kylin Soong commented on TEIID-4928:
------------------------------------
> 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?
simba schema tools seems has difficult, probably we add a tools like the teiid-oauth-util.sh, run this tool can generate a ddl,sql or souce-model,xml. How to define the metadata manually also is lacked.
> 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 Kylin Soong (JIRA)
[ https://issues.jboss.org/browse/TEIID-4928?page=com.atlassian.jira.plugin... ]
Kylin Soong commented on TEIID-4928:
------------------------------------
Hi [~jdurani]
Thanks for your contribute on Couchbase connector. I would like to add additional comments to account for some of your questions, I hope this can help you.
> Why need NAMEINSOURCE for each of columns and tables?
First, you need to know the Logical Hierarchy based data stracture of a Couchbase cluster, it looks
{code}
Namespaces
└── Keyspaces
└──Documents
{code}
the documents under keyspaces are schemaless, which can contain different structure of documents, these documents also main contain multiple dimension of nested json, or nested arrays or arrays of differently-typed elements.
The path expressions get retrive the value of a attr, eg, the below path is to retrive of the value of p_asia, which under the nested document geo,
{code}
namespace:keyspace/`travel-sample`.geo.`p_asia`
{code}
the below path is to retrive of the value of multiple dimension of nested array
{code}
namespace:keyspace/`travel-sample`.a[0][0][1][1]
{code}
The Couchbase don't like other document database, it not supply any metadata, teiid load metadata will create metadata aotomaticly, because each of columns represent a attr in a json document, for a column in teiid table to map to this kinds of attr in document, the NAMEINSOURCE is necessary.
The table name map to keyspace name in couchbase, same reason, due to lack of couchbase based native metadata, a TypeNameList properties are used to define table name, eg, if you define
{code}
<property name="importer.typeNameList" value="`default`:`type`"/>
{code}
then teiid load all documents under Keyspace default, if a document has a attribute `type`, then the referenced value will be treated as table name. So for each table a NAMEINSOURCE also is necessary, we need use it to real Keyspace.
Another reason for a table need a NAMEINSOURCE is array table, any array existed in a document will be map to a separate table, as above path expressions example, it's a 4 dimension array, the generated tables looks as [1], for this occasion, the NAMEINSOURCE is also a path expression and necessary.
> How to avoid pass null
Base on the design so far, not try to design souce model by yourself, use CouchbaseMetadataProcessor generated tables/procedures. If you want to design souce model by yourself, you should strictly base on the logic of Generating Schema sesion in [2].
Feel free to update the document, if you have good understand of design souche model, you can add a "Design Schema" section in [2].
> Does sampleSize make sense?
Due to CouchbaseMetadataProcessor fetch all documents in different Keyspaces, so a sampleSize is use to control maximum number of documents should be fetch per keyspace.
Actually, some other Couchbase JDBC provider(like Simba, Talend) also use the same logic, use a sampleSize to avoid select all, there is not good ways to resolve schemaless, zero-metadata documents database.
Kylin
[1] https://github.com/teiid/teiid/blob/master/connectors/couchbase/translato...
[2] https://teiid.gitbooks.io/documents/content/reference/couchbase_translato...
> 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-4932) Support defining UDFs based upon a class and or function
by Steven Hawkins (JIRA)
Steven Hawkins created TEIID-4932:
-------------------------------------
Summary: Support defining UDFs based upon a class and or function
Key: TEIID-4932
URL: https://issues.jboss.org/browse/TEIID-4932
Project: Teiid
Issue Type: Enhancement
Components: Query Engine
Reporter: Steven Hawkins
Assignee: Steven Hawkins
Fix For: 10.x
With the new ddl support, we should allow an import to work against a class to define UDFs.
We should also in general support inferring arguments for UDFs and UDFs that are defined by a method.
--
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 Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4931?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-4931:
---------------------------------------
If you directly query the cli or use adminshell to get the vdbs, what do you see?
That will help determine if this is specifically a console issue.
> 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 updated TEIID-4926:
-------------------------------
Affects 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, 8.12.x-6.4
> 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