gianm commented on issue #11929:
URL: https://github.com/apache/druid/issues/11929#issuecomment-972953837


   > I think the EXTERN is not intuitive for users. It still has the smell of 
old JSON supervisor/task spec. I think the way ClickHouse uses is more user 
friendly. It uses ENGINE or SETTINGS sub-clause to specify the parameters. 
Below are examples taken from ClickHouse user doc. I think this also answers 
@abhishekagarwal87 question.
   
   @FrankChen021 I agree that it would be better to have a way to do this that 
doesn't involve using the existing JSON objects. However there are two reasons 
I wanted to start with the JSON-based one, and add friendlier ones later on:
   
   1) It enables us to support all existing sources / formats without needing 
to make a bunch of new SQL wrappers immediately.
   
   2) It enables existing apps that already know how to generate the JSON 
objects to switch to SQL more easily. For example it would enable Druid's 
builtin web console to write an EXTERN function using some of the same models 
it already has for handling inputsources and inputformats.
   
   However I definitely agree that adding friendlier versions would be good, 
and new users would probably prefer the friendlier versions. Maybe for the 
example I had in the original comment, a friendly version would look like:
   
   ```
   FROM S3('s3://bucket/file', JSON(), 
'channel:string,cityName:string,countryName:string,timestamp:string')
   ```
   
   I think this would be pretty straight-forward to do, so I think it makes 
sense to add a few of these common ones before we ship the feature. (In 
addition to "fall-back" EXTERN.)
   
   Btw, I feel it's kind of annoying to have the type signature there, but the 
reason it's there is that the planner needs to know the signature of the data 
that is being selected, before the data is actually inspected. At some point 
I'd like to explore ways we can get rid of the type signature in some cases or 
even all cases. But I had it there for now, because it fits into the existing 
planner better.
   
   Anyway, what do you think?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to