-
1. Re: Issue with CHAR datatype in oracle source
shawkins Apr 8, 2014 12:13 PM (in response to krishnam503)Are you using a dynamic vdb or Teiid Designer? If it's Teiid Designer, I believe this is a know issue with their import logic that is inappropriately mapping the char type, it should map to string instead. See [TEIIDDES-2061] char[n+] field is truncated by importer - JBoss Issue Tracker
-
2. Re: Issue with CHAR datatype in oracle source
rareddy Apr 8, 2014 12:14 PM (in response to krishnam503)In Teiid, it does not have fixed CHAR type. When somebody designs CHAR(4), it is effectively treated as CHAR(1). You can use varchar(4) or string(4) type to work around the limitation.
Ramesh..
-
3. Re: Issue with CHAR datatype in oracle source
krishnam503 Apr 8, 2014 4:29 PM (in response to shawkins)Hi Ramesh,
I tried to manually change the type to string(4) in teiid metadata but still didnt work..Based on Steven reply it looks like it is fixed in 8.4 version..
So i tried EAP6.1 and Teiid 8.6 version.. Now i am facing new issues..Below is the log..
Basically it is unable to find the database info i think..
OneViewVDB.1 model "RRDS_Stage" metadata failed to load. Reason:TEIID80002 null does not exist.
FYI..when i try the connectivity in JBOSS admin console i am able to do the test connection. But why it is unable to find in VDB??
16:18:58,108 INFO [org.teiid.RUNTIME] (MSC service thread 1-3) TEIID50029 VDB OneViewVDB.1 model "OneViewModel" metadata is currently being loaded. Start Time: 4/8/14 4:18 PM
16:18:58,134 INFO [org.teiid.RUNTIME] (MSC service thread 1-3) TEIID50029 VDB OneViewVDB.1 model "IDR_Stage" metadata is currently being loaded. Start Time: 4/8/14 4:18 PM
16:18:58,167 INFO [org.hibernate.validator.internal.util.Version] (ServerService Thread Pool -- 51) HV000001: Hibernate Validator 4.3.1.Final
16:18:58,167 INFO [org.teiid.RUNTIME] (MSC service thread 1-3) TEIID50029 VDB OneViewVDB.1 model "RRDS_Stage" metadata is currently being loaded. Start Time: 4/8/14 4:18 PM
16:18:58,412 WARN [org.teiid.RUNTIME] (teiid-async-threads - 3) TEIID50036 VDB OneViewVDB.1 model "RRDS_Stage" metadata failed to load. Reason:TEIID80002 null does not exist.
-
4. Re: Issue with CHAR datatype in oracle source
rareddy Apr 8, 2014 7:05 PM (in response to krishnam503)Looks like there is something wrong with VDB, can you recreate the VDB and re-deploy?
-
5. Re: Issue with CHAR datatype in oracle source
krishnam503 Apr 8, 2014 10:13 PM (in response to rareddy)Thank you for your reply. After creating new vdb it worked fine...
But my original problem with CHAR(4) is still not resolved with teiid 8.6 and eap6.1
As per your suggestion I tried to keep native type as CHAR only but dataType attribute to String in teiid designer..still didnt work.
Could you please provide more details on workaround..
-
6. Re: Issue with CHAR datatype in oracle source
rareddy Apr 9, 2014 8:55 AM (in response to krishnam503)Did you change that on source model for your Oracle?
-
7. Re: Issue with CHAR datatype in oracle source
krishnam503 Apr 9, 2014 9:24 AM (in response to rareddy)Hi Ramesh
Do you mean in the actual oracle database? If so changing source is not possible option..It is legacy investment data repository which used by many systems..so we can not impact and change source.
But in my teiid relational source model i set datatype to string and also in view model it is string.
-
8. Re: Issue with CHAR datatype in oracle source
rareddy Apr 9, 2014 9:42 AM (in response to krishnam503)I was NOT suggesting to change in the physical source, only in VDB's model. With the changes you made it should have worked correctly.
See what is set on the native type on the column, see if changing that or removing it have any effect. You are working with 8.6 right? Also is it possible for you to share your VDB (only if there no sensitive information)?
Ramesh..
-
9. Re: Issue with CHAR datatype in oracle source
van.halbert Apr 9, 2014 9:46 AM (in response to krishnam503)Krishna,
As Steve indicated above, designer had a fix for this: [TEIIDDES-2061] char[n+] field is truncated by importer - JBoss Issue Tracker
Which version of designer are you using?
Van
-
10. Re: Issue with CHAR datatype in oracle source
krishnam503 Apr 9, 2014 1:09 PM (in response to van.halbert)Thank you..i thought i need to update teiid runtime to fix it.
Now updated the teiid designer to 8.3.2 and it fixed the issue..
Last question..I am trying to use the odata url and it gives me entity not found..Please note that i have created the primary key in my view model..
OneViewTest is my VDB
OneViewTest is my relational view schema, in which i have VM_ACCOUNT_ATTRIBUTES
http://localhost:8080/odata/OneViewTest.1/OneViewTest.VM_ACCOUNT_ATTRIBUTES
http://localhost:8080/odata/OneViewTest.1/$metadata
But this $metadata url works fine..
Do i need to do something extra to enable odata?
NotFoundException with message TEIID16011 EntitySet "OneViewTest.VM_ACCOUNT_ATTRIBUTES" is not found; Check the spelling, use modelName.tableName; The table that representing the Entity type must either have a PRIMARY KEY or UNIQUE key(s).
-
11. Re: Issue with CHAR datatype in oracle source
rareddy Apr 9, 2014 1:20 PM (in response to krishnam503)As the error message says, your view must have primary key for the Odata to work.
-
12. Re: Re: Issue with CHAR datatype in oracle source
krishnam503 Apr 9, 2014 3:32 PM (in response to rareddy)
I do have it..all my underlying tables have the primary key and the relational view also have the primary key. Please see attached
-
teiid.gif 41.7 KB
-
-
13. Re: Re: Issue with CHAR datatype in oracle source
rareddy Apr 9, 2014 4:28 PM (in response to krishnam503)How does your URL look like? make sure you letter case matches and use "modelname.viewname".
-
14. Re: Re: Re: Issue with CHAR datatype in oracle source
krishnam503 Apr 9, 2014 5:19 PM (in response to rareddy)my odata url is
http://localhost:8080/odata/OneViewTest.1/OneViewTest.VM_ACCOUNT_ATTRIBUTES
Below sql gives me data in squirrel
select * from OneViewTest.VM_ACCOUNT_ATTRIBUTES
and my squirrel url is
jdbc:teiid:OneViewTest@mm://localhost:31000
So my VDB name is : OneViewTest
my schema name: OneViewTest
table name: VM_ACCOUNT_ATTRIBUTES
I have attached screenshot which shows both schema and table name
-
teiid.png 8.0 KB
-