[teiid-issues] [JBoss JIRA] (TEIID-4928) Couchbase - NAMEINSOURCE required for all the columns and tables

Juraj Duráni (JIRA) issues at jboss.org
Wed May 24 08:23:00 EDT 2017


    [ https://issues.jboss.org/browse/TEIID-4928?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13411246#comment-13411246 ] 

Juraj Duráni commented on TEIID-4928:
-------------------------------------

[~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)



More information about the teiid-issues mailing list