-
1. Re: Unable query array datatype using Teiid Designer for a MongoDB collection.
sagarika1in Apr 19, 2018 1:43 PM (in response to sagarika1in)I am getting following error message:
Select array_get(cst_mdl.overview.tags, 1) from overview
Error Message
- org.teiid.runtime.client.TeiidClientException: java.lang.RuntimeException: Remote org.teiid.api.exception.query.ExpressionEvaluationException: TEIID30328 Unable to evaluate array_get(cst_mdl.overview.tags, 1): TEIID30384 Error while evaluating function array_get
-
2. Re: Unable query array datatype using Teiid Designer for a MongoDB collection.
rareddy Apr 19, 2018 4:53 PM (in response to sagarika1in)Can yo attach the JSON document that is part of this View? May be along with you can attach the VDB you are using.
-
3. Re: Unable query array datatype using Teiid Designer for a MongoDB collection.
sagarika1in Apr 20, 2018 7:56 AM (in response to rareddy)Hi Ramesh,
Please find the json document,VDB and Model file as attached herewith for
your reference.
Regards
Sagarika Singh
Tata Consultancy Services
Mailto: sagarika.singh@tcs.com
Website: http://www.tcs.com
-
mongo_document.json 322 bytes
-
cst_v7.vdb.zip 17.4 KB
-
cst_mdl.xmi.zip 15.8 KB
-
-
4. Re: Unable query array datatype using Teiid Designer for a MongoDB collection.
rareddy Apr 20, 2018 3:06 PM (in response to sagarika1in)Using the latest Teiid 10.2 version I see the result fine, granted it can be better in detecting the data type of the array column. What version are you using?
-
6. Re: Unable query array datatype using Teiid Designer for a MongoDB collection.
sagarika1in Apr 21, 2018 9:21 AM (in response to rareddy)Hi Ramesh,
Could you please let me know the steps to see the result for array
datatype. Screenshots will be really helpful to replicate the same in my
system.
I am using 9.0.0 version of teiid designer.
Regards
Sagarika Singh
Tata Consultancy Services
Mailto: sagarika.singh@tcs.com
Website: http://www.tcs.com
-
7. Re: Unable query array datatype using Teiid Designer for a MongoDB collection.
rareddy Apr 23, 2018 9:25 AM (in response to sagarika1in)Sagarika,
Looks like the Designer does not support the Array Type columns, see [TEIIDDES-2621] Support for array datatype - JBoss Issue Tracker
However, if you convert the data type of "tags" column to "string", you will see the data through Designer. If you are using Dynamic VDB, then you can convert the column type as "string[]" then you should be able to able query as
select array_get(tags,1) from mytable.
once you deploy the VDB to server and query through any SQL client. Sorry, I was assuming you were not using the Designer before. If you are a customer please raise an issue with RedHat support, otherwise, you need to wait for above JIRA or switch using to Dynamic VDB.
Ramesh..
-
8. Re: Unable query array datatype using Teiid Designer for a MongoDB collection.
sagarika1in Apr 24, 2018 12:56 AM (in response to rareddy)Dear Ramesh,
How can we change the datatype to "string[]". I can see only String
datatype. Could you please advise how to change array data type to
String[].
Regards
Sagarika Singh
Tata Consultancy Services
Mailto: sagarika.singh@tcs.com
Website: http://www.tcs.com
-
9. Re: Unable query array datatype using Teiid Designer for a MongoDB collection.
rareddy Apr 24, 2018 9:49 AM (in response to sagarika1in)I said to change that in the Dynamic VDB, which nothing but an XML/DDL based text file NOT in Designer.
When you create the VDB, on VDB explorer page, there is a button to export VDB as Dynamic VDB, using that edit, then deploy the edited file to Teiid server. Then connect with your JDBC client tool like SquirreL and issue commands.
-
10. Re: Unable query array datatype using Teiid Designer for a MongoDB collection.
sagarika1in Apr 24, 2018 10:01 AM (in response to rareddy)Ok ,.. Thanks for all your help Ramesh.
Regards
Sagarika Singh
Tata Consultancy Services
Mailto: sagarika.singh@tcs.com
Website: http://www.tcs.com