[JBoss JIRA] (TEIID-3520) Extend the Swagger support in the WS Translator
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-3520?page=com.atlassian.jira.plugin... ]
Ramesh Reddy commented on TEIID-3520:
-------------------------------------
[~kylin] I had to reject the pull request, as every time I spend few more minutes I learn more about the Swagger Specification than before ;)
Swagger is complete definition of Rest Service API,
- It has data type definitions. It defines all primitive data types
- It has Model definitions, aka, a way define the response payloads using a entity types.
- A single call can support multiple HTTP verbs, including support for various types of verbs GET, POST, DELETE, PUT
- Way to define Path/Query/Form based parameters
- Way to define expected response codes or error codes
- Way to define "Accepts" and "Content-type" headers on the services, as well as support for multiple versions of them
- Multipart/form-data capability definition
- Way to define security
So, this little more than just execute a procedure of given name paradigm we may have took with WSDL and what is your pull request. This is much like subset of OData specification, I would call this a "ODate Lite" or "Procedure Based REST Specification". OData goes much more deep with Entity based model, which close to ORM/JPA model, with strong querying capabilities. In a way, OData's _FunctionImports_ can be similar to the Swagger's API. Like many Swagger tools, we can drive this much further as we are doing with OData.
I apologize and retract my earlier statement about not needing separate translator, we should write a separate translator for this. We need to use the existing "connector-ws" as the resource-adapter. I observed in your pull
- you only modeled "GET" calls, we need to support every type of http verb under a API call.
- "operationId" needs to be the name of the procedure.
- "description" needs to be in "setAnnotation" of the property
- "produces" needs to be captured in metadata, where it becomes aid select a serilizer or de-serializer to read responses
- Do not just return the Blob, since we have model for the pay load, design such that the procedure returns a resultset of the type definition defined.
- As per to read the contents to parse them, we could either write simple de-serializers, or figure out a way to use SQL/XML functions to automatically parse it. In OData I choose the de-serializers as they were available and it was easy, but this could be our chance to use SQL/XML or JSON based functions. Writing a stax based parser should be easy enough for known types, obviously if the content type is not json or XML, the procedure would need to resort to returning the CLOB or BLOB or SQL/XML.
- Responses need to be validated against the definitions and codes and form the success or failures based on them
- I believe we can extract out some common code from OData V4 translator for document handling.
- I also think we can extract some common metadata properties for this from OData V4 translator
- security stuff seems interesting, we need to see how these could be integrated.
Next Steps:
- I do not think we can get much of this before 8.12 final, so I suggest we move the target.
- Work on getting your current code into a making a new translator, as all your configuration module.xml etc is important, no need to do that work again.
- Make few changes as I suggested above and try to capture all the APIs
- See if there are libraries out there already to read the payloads in java for (json and xml. At a minimum for json, it is easy enough to write one if we can find, I did a quick search did not find any, need to check how the codegen project does)
- Once you get here, I will take look and see what parallels we get out of OData V4 translator etc, to make them work similar and share code. And iterate on some of the advanced features like security, multipart etc.
Tasks for me: Read the specification fully, I still only skimmed the api spec doc, I will read it next few days.
> Extend the Swagger support in the WS Translator
> -----------------------------------------------
>
> Key: TEIID-3520
> URL: https://issues.jboss.org/browse/TEIID-3520
> Project: Teiid
> Issue Type: Feature Request
> Components: Misc. Connectors
> Reporter: Ramesh Reddy
> Assignee: Kylin Soong
> Fix For: 8.12
>
>
> http://swagger.io is popular REST service description framework, it defines a specification http://swagger.io/specification/ for REST service definition.
> Teiid WS translator should add the ability to read this file (like WSDL) and provide the REST methods as endpoints that can be consumed from Teiid.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 3 months
[JBoss JIRA] (TEIID-2936) Combining multiple 'in' criteria can prevent pushing criteria to database
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-2936?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-2936.
-----------------------------------
Resolution: Done
Made a small update in 8.12 to make the ordering of the in values consistent - the original change effectively reversed them "x in (1,2,3,4)" could become "x in (3, 4) or x in (1, 2)"
> Combining multiple 'in' criteria can prevent pushing criteria to database
> -------------------------------------------------------------------------
>
> Key: TEIID-2936
> URL: https://issues.jboss.org/browse/TEIID-2936
> Project: Teiid
> Issue Type: Feature Request
> Components: Query Engine
> Affects Versions: 8.7
> Reporter: Mike Higgins
> Assignee: Steven Hawkins
> Fix For: 8.7.1.6_2, 8.8
>
>
> When two 'in' criteria containing constant values on the same field are combined with an 'or', Teiid will combine the two into a single 'in' operation.
> Since Oracle (for example) has a 1000 item limit on the 'in' values, if the resulting combined list contains more than 1000 values, it can no longer be pushed down into Oracle for execution.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 3 months
[JBoss JIRA] (TEIID-3370) Add translator for OData V4 based service
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-3370?page=com.atlassian.jira.plugin... ]
Ramesh Reddy resolved TEIID-3370.
---------------------------------
Release Notes Text: OData V4 based translator has been added.
Resolution: Done
Currently the translator can support
- Reading/creation of the Teiid Metadata based on $metadata document
- Allows execution of "SELECT" on EntitySet tables, execution of "Functions" and "Actions"
- Allows JOIN based pushdown, based on EntitySet's navigation property relations. i.e. you can issue a JOIN based call for EntitySet and its Navigation property which will be executed as single call with "$expand"
- ComplexType properties in a EntitySet are represented as additional tables, with 1-1 or 1-many relationship with the parent EntitySet.
-SELECT on ComplexType based child tables are allowed. Also you can issue a JOIN based call between parent EntitySet and complex type table, which results in single call.
- All the Extended properties of "EntityType" or "ComplexType" will be squashed into derived type, which will become the basis of the table definition in Teiid
- Allows INSERT/UPDATE/DELETE operations on EntitySets.
Not supported/Not Tested
- Update operations on complex type based tables
- EdmStream based operations
- Annotations are not read into metadata
- Add property to lock in on a Content-Type
- Batch processing for update/delete operations, as current method is transactionally NOT safe
- SQL enhancements ?
> Add translator for OData V4 based service
> -----------------------------------------
>
> Key: TEIID-3370
> URL: https://issues.jboss.org/browse/TEIID-3370
> Project: Teiid
> Issue Type: Feature Request
> Components: Misc. Connectors
> Reporter: Debbie Steigner
> Assignee: Ramesh Reddy
> Fix For: 8.12
>
>
> Feature Request to add support for OData V4 as Datasource
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 3 months
[JBoss JIRA] (TEIID-3745) Procedure input parsing enhancements
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-3745?page=com.atlassian.jira.plugin... ]
Ramesh Reddy resolved TEIID-3745.
---------------------------------
Resolution: Done
Removed the custom code in favor of the code from Olingo library for parsing the Action parameters.
> Procedure input parsing enhancements
> ------------------------------------
>
> Key: TEIID-3745
> URL: https://issues.jboss.org/browse/TEIID-3745
> Project: Teiid
> Issue Type: Enhancement
> Components: OData
> Affects Versions: 8.11
> Reporter: Ramesh Reddy
> Assignee: Ramesh Reddy
> Fix For: 8.12
>
>
> Based on Olingo 4.0.0 release, the procedure parameter parsing needs to be re-visited as some of it is written out side the framework in Teiid.
> Also handling of the Stream object (XML Document) input may be still outside the specification compliance for time being, as specification only allows procedure with Edm.Stream objects as Bound operations, and Teiid procedures are all UnBound operations.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 3 months
[JBoss JIRA] (TEIID-2936) Combining multiple 'in' criteria can prevent pushing criteria to database
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-2936?page=com.atlassian.jira.plugin... ]
Steven Hawkins updated TEIID-2936:
----------------------------------
Fix Version/s: 8.7.1.6_2
> Combining multiple 'in' criteria can prevent pushing criteria to database
> -------------------------------------------------------------------------
>
> Key: TEIID-2936
> URL: https://issues.jboss.org/browse/TEIID-2936
> Project: Teiid
> Issue Type: Feature Request
> Components: Query Engine
> Affects Versions: 8.7
> Reporter: Mike Higgins
> Assignee: Steven Hawkins
> Fix For: 8.8, 8.7.1.6_2
>
>
> When two 'in' criteria containing constant values on the same field are combined with an 'or', Teiid will combine the two into a single 'in' operation.
> Since Oracle (for example) has a 1000 item limit on the 'in' values, if the resulting combined list contains more than 1000 values, it can no longer be pushed down into Oracle for execution.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 3 months
[JBoss JIRA] (TEIID-3747) Deploying a .vdb where a dynamic vdb has already been deployed, fails due to duplicates
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3747?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-3747.
-----------------------------------
Resolution: Done
Added an explicit check to give a better exception.
> Deploying a .vdb where a dynamic vdb has already been deployed, fails due to duplicates
> ---------------------------------------------------------------------------------------
>
> Key: TEIID-3747
> URL: https://issues.jboss.org/browse/TEIID-3747
> Project: Teiid
> Issue Type: Bug
> Components: Server
> Affects Versions: 8.7.1.6_2
> Reporter: Van Halbert
> Assignee: Steven Hawkins
> Fix For: 8.12
>
>
> deployed a dynamic vdb using CLI: deploy teiidfiles/vdb/portfolio-vdb.xml
> then in Designer, tried to deploy the same named VDB, but as a .vdb and the deployment fails with errors indicating duplicate service:
> 11:26:31,301 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-6) MSC000001: Failed to start service jboss.deployment.unit."Portfolio.vdb".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."Portfolio.vdb".INSTALL: JBAS018733: Failed to process phase INSTALL of deployment "Portfolio.vdb"
> at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:166) [jboss-as-server-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1980) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1913) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_55]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_55]
> at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_55]
> Caused by: org.jboss.msc.service.DuplicateServiceException: Service jboss.teiid.ds-listener.Portfolio.1./accounts-ds is already registered
> at org.jboss.msc.service.ServiceRegistrationImpl.setInstance(ServiceRegistrationImpl.java:158) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 3 months
[JBoss JIRA] (TEIID-3567) Create a combined example for use hadoop hdfs as a datasource
by Kylin Soong (JIRA)
[ https://issues.jboss.org/browse/TEIID-3567?page=com.atlassian.jira.plugin... ]
Kylin Soong resolved TEIID-3567.
--------------------------------
Resolution: Done
spark,hive,hbase be added, if add more we may in a new issue, or reopen this one in future, current, set to resolved
> Create a combined example for use hadoop hdfs as a datasource
> -------------------------------------------------------------
>
> Key: TEIID-3567
> URL: https://issues.jboss.org/browse/TEIID-3567
> Project: Teiid
> Issue Type: Task
> Affects Versions: 8.12
> Reporter: Kylin Soong
> Assignee: Kylin Soong
> Fix For: 8.12
>
>
> Current we can connect/transform/integrate Big data product like Hive, HBase, Spark via HBase translator, Hive translator, this example will demonstrate this.
> Phoenix only work with Hadoop 2.x, this example will demonstrate Hive translator + HBase + Hadoop 1.x
> This example will demonstrate Hive translator + Spark + Hadoop
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 3 months