1 2 Previous Next 24 Replies Latest reply on Dec 6, 2018 9:36 AM by rareddy Go to original post
      • 15. Re: Teiid Spring Boot with IBMDB2
        13_abhi

        Hi Ramesh, It worked now. But some query(ODATA GET) taking too much time and dd n't get result. Any thought..

         

        2018-12-03 20:32:50.216 DEBUG 15336 --- [rocessorQueue55] org.teiid.CONNECTOR                      : 8upG4hVKOrjM.0.0.1 Getting results from connector

        2018-12-03 20:32:50.241 DEBUG 15336 --- [nio-8080-exec-2] org.teiid.BUFFER_MGR                     : 8upG4hVKOrjM.0.0.1 Blocking on source query 8upG4hVKOrjM.0.0.1

        2018-12-03 20:32:50.241 DEBUG 15336 --- [nio-8080-exec-2] org.teiid.BUFFER_MGR                     : 8upG4hVKOrjM.0 Blocking on source request(s).

        2018-12-03 20:32:50.241 DEBUG 15336 --- [nio-8080-exec-2] org.teiid.PROCESSOR                      : Request Thread 8upG4hVKOrjM.0 - processor blocked

        • 16. Re: Teiid Spring Boot with IBMDB2
          rareddy

          Is your data source returning the results slow? other than that teiid would only take additional time in marshalling the results. At TRACE level it log messages when it submitted to your DB2 and when the results returned etc, check to see if anything is wrong there.

          • 17. Re: Teiid Spring Boot with IBMDB2
            13_abhi

            Get below exception while fetching the column with XML content in it,

             

            http://localhost:8080/table1?$select=NOTES

            {

                "error": {

                    "code": null,

                    "message": "The value 'com.ibm.db2.jcc.am.pe@3266e95e' is not valid for property 'NOTES'."

                }

            }

            • 18. Re: Teiid Spring Boot with IBMDB2
              13_abhi

              aused by: org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException: The value type class com.ibm.db2.jcc.am.pe is not supported.

              • 19. Re: Teiid Spring Boot with IBMDB2
                rareddy

                What is the data type in database? And then how is this being represented through JDBC metadata? For example, if you connect through tools like SquirreL or DBVisualizer what the data type it reports?

                 

                XML is not supported type in OData, it needs to be defined as "stream" type. The data types that are defined in Teiid as blob, clob, xml would be automatically converted to a stream type. In your case the metadata of DB2 is downloaded during the startup and a Teiid model is created. It could be that either Teiid is not converting the DB2 XML type correctly into its runtime type or DB2 is reporting incorrectly.

                 

                You can define the Entity for Notes table and mark the column as Clob, try to figure out what is wrong with the above metadata import.

                • 20. Re: Teiid Spring Boot with IBMDB2
                  13_abhi

                  Hi,

                  I have checked the type and it is XML. i would like to create a view on top of that. Let me know ODATA will support it?( access view over ODATA)

                   

                  http://localhost:8080/view

                  • 21. Re: Teiid Spring Boot with IBMDB2
                    13_abhi

                    Aslo metadata url is only giving table informations not views,

                     

                    http://localhost:8080/$metadata----> Gives only tables inside entity set

                     

                    Application Properties

                     

                    spring.datasource.test.url=

                    spring.datasource.test.username=

                    spring.datasource.test.password=

                    spring.datasource.test.driver-class-name=com.ibm.db2.jcc.DB2Driver

                    spring.datasource.test.importer.SchemaPattern=my_schema

                    spring.datasource.test.importer.UseQualifiedName=true

                    spring.datasource.test.importer.UseFullSchemaName=false

                    spring.datasource.test.importer.TableTypes=MY_VIEW

                    • 22. Re: Teiid Spring Boot with IBMDB2
                      rareddy

                      spring.datasource.test.importer.TableTypes=TABLE,VIEW

                      • 23. Re: Teiid Spring Boot with IBMDB2
                        13_abhi

                        I have tried this but it not able to find the view from URL

                         

                        application properties:,

                        • spring.datasource.credit.url=
                        • spring.datasource.credit.username=
                        • spring.datasource.credit.password=
                        • spring.datasource.credit.driver-class-name=com.ibm.db2.jcc.DB2Driver
                        • spring.datasource.credit.importer.SchemaPattern=my_schema
                        • spring.datasource.credit.importer.UseQualifiedName=true
                        • spring.datasource.credit.importer.UseFullSchemaName=false
                        • spring.datasource.credit.importer.TableTypes=TABLE,VIEW

                         

                        Meta data url  is giving only tables not vew. ---- -http://localhost:8080/http://localhost:8080/$metadata

                         

                        http://localhost:8080/CUSTOMER_VIEW  is giviing following error,

                         

                        {

                            "error": {

                                "code": null,

                                "message": "Cannot find EntitySet, Singleton, ActionImport or FunctionImport with name 'CUSTOMER_VIEW'."

                            }

                        }

                        • 24. Re: Teiid Spring Boot with IBMDB2
                          rareddy

                          How is View definition look like in the DB? Does it a have PK or Unique key in it? Also when I mentioned the View I was thinking of defining an Entity based view in Teiid, not in Database but that should work also as long as you took care of the data conversion of the column that is correctly represented in the Teiid.

                          1 2 Previous Next