calcite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shuyi Chen <suez1...@gmail.com>
Subject Re: storage of schema (json model) in a database
Date Sat, 10 Mar 2018 00:53:44 GMT
Created jira (https://issues.apache.org/jira/browse/CALCITE-2209) for the
issue.

On Fri, Mar 9, 2018 at 3:30 PM, Julian Hyde <jhyde@apache.org> wrote:

> Switching from files to URLs seems like a good idea. (You can load files
> using the “file:” protocol or omitting the protocol.)
>
> Note we have a special built-in protocol called “inline:”. Let’s keep that
> working.
>
> > On Mar 9, 2018, at 1:54 PM, Shuyi Chen <suez1224@gmail.com> wrote:
> >
> > 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 <jhyde@apache.org <mailto:
> jhyde@apache.org>> wrote:
> >
> >> Maybe you could call https://docs.oracle.com/
> javase/8/docs/api/java/net/ <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# <
> 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 <zgolliasma@gmail.com> 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."
>
>


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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message