Just take a quick look. I think the URLStreamHandlerFactory might be the
way to go, but might not work out of the box at the moment in Calcite.

If you look at ModelHandler.java, it it reading the file using java.io.File
which assumes the platform the default local file system.

However, I think we can change the code a bit to use the URL,
URLStreamHandler, and URLConnection classes to load the json file, what do
you think, Julian?

On Fri, Mar 9, 2018 at 11:00 AM, Julian Hyde <[email protected]> wrote:

> Maybe you could call https://docs.oracle.com/javase/8/docs/api/java/net/
> URL.html#setURLStreamHandlerFactory-java.net.URLStreamHandlerFactory- <
> https://docs.oracle.com/javase/8/docs/api/java/net/URL.html#
> setURLStreamHandlerFactory-java.net.URLStreamHandlerFactory-> with your
> own custom handler. I haven’t tried it.
>
> > On Mar 9, 2018, at 2:03 AM, asma zgolli <[email protected]> wrote:
> >
> > hello ,
> >
> >
> > I wish to use calcite in my project and I wish to store schema definition
> > (json models) in a database , manage them and use the stored schema to
> > connect to calcite using java driver.
> >
> > example :
> >
> > instead of : DriverManager.getConnection(
> > "jdbc:calcite:model=target/classes/model.json")
> >
> > I wish to be able to do the following call :
> >
> > DriverManager.getConnection(
> > "jdbc:calcite:model=hdfs://localhost:someport/somepath/model.json")
> >
> > or :
> > DriverManager.getConnection("jdbc:calcite:model=somemongodb_document")
> >
> > is that possible ?
> >
> > thank you for your help ,
> >
> > I'm new to calcite and I think it suits my needs so far
> > --
> > best regards
> > Asma ZGOLLI
> >
> > PhD student in data engineering - computer science
> > Tel : (+33) 07 52 95 04 45
>
>


-- 
"So you have to trust that the dots will somehow connect in your future."

Reply via email to