-
New Feature
-
Resolution: Done
-
Major
-
None
-
All
-
GreenHopper Ranking:0|i2n0cj:
-
9223372036854775807
-
Small
-
To be defined
Currently, the HTTPClientProcessor guess schema is an internal service: https://github.com/Talend/connectors-ee/blob/319c22366076612dab2d1a3124d2ddf200ffd764/rest-improved/src/main/java/org/talend/components/restImproved/service/UIService.java#L70
This service throws an exception if the processor can't infer schema without executing the job from input until the HTTPClientProcessor, which is currently forbidden: https://github.com/Talend/connectors-ee/blob/319c22366076612dab2d1a3124d2ddf200ffd764/rest-improved/src/main/java/org/talend/components/restImproved/service/UIService.java#L104
In that case, it could be great if a dialog pops up in studio to ask user if it allows the execution in order to retrieve the schema.
[EDIT]
This second part is already referrenced in another ticker: https://jira.talendforge.org/browse/TCOMP-2343 it's quite related by the "action" attribute.
Currently, discovered schema is read in the standard output of the process executed to infer the schema. It would be possible to identify error output and, with some configuration, ask to popup a dilaog bow to ask the user if he is agree to execute the subjob to retrieve the real schema:
// TCK - DISCOVERSCHEMA - ERROR { "error": "The schema can't be inferred.", "action": "execute" }
[EDIT bis]
It should not be an error since nominal guess schema path. The nominal path is:
- Click guess schema
- The service tries to infer schema using only configuration
- it can't
- Studio ask to user if he wants to execute the query to retrieve the payload
- The service is called a second time
- Execute the HTTP query
- return the schema
The ouput could be :
{ "message": "The schema can't be inferred. It needs to execute the query.", "type": "execute" }
This will open a message popup and ask ti execute the mock job.
or, if there is any error while guess schema:
{ "message": "There has been an error: timeout.......", "type": "error" }
- is related to
-
TCOMP-2710 Unable to guess schema - improve workflow and exception throwing/handling
- Done
-
TCOMP-2707 Guess schema throw exception but output correct schema
- Rejected
-
TCOMP-2343 Guesschema - Improve error message
- Rejected