We introduced the “schemaFactory” connect string parameter in https://issues.apache.org/jira/browse/CALCITE-1259 <https://issues.apache.org/jira/browse/CALCITE-1259> for cases where the connection had a single schema and that schema was trivial. That doesn’t mean that the schema is empty (a schema with no tables is fairly useless) but that it is self-populating. If I recall correctly the Druid schema factory creates a Calcite table for each data set in Druid, so it fulfills these criteria.
But if you need more content in a schema, I suggest you go back to the old way and generate a small JSON model. Note that you can prefix the model URL with “inline:” to pass the content of the model rather than putting the model in a temporary file. Another alternative is to dispense with the model entirely and use methods such as Schema.addTable to build the schema programmatically. Really, the JSON model stuff is just a builder on top of that. Julian > On Dec 27, 2016, at 3:26 AM, Gupta, Shuchi <[email protected]> wrote: > > Hi Team > > In reference to apache druid, I have been using a JSON file as metadata for > my connections to a custom database based on elastic search. > Instead I intend to create the metadata on the fly by eliminating this json > path from the connection url and use : > jdbc:calcite:schemaFactory=org.apache.calcite.adapter.druid.DruidSchemaFactory; > schema.url=http://localhost:8082 <http://localhost:8082/>; > schema.coordinatorUrl=http://localhost:8081 <http://localhost:8081/> > > The connection is passing successfully, but I fail to understand where shall > I map the schema details . Kindly let me know what change would be required > to implement this functionality. > > > Thanks and Regards > Shuchi Gupta > Software Engineer (CA) > > CA Technologies | Plot 115/1, 115/16-115/21 | Hyderabad, 500032 > Office: +71262 | [email protected] > > <mailto:[email protected]> <http://www.ca.com/us/default.aspx> > <http://twitter.com/CAInc> <http://www.slideshare.net/cainc> > <https://www.facebook.com/CATechnologies> > <http://www.youtube.com/user/catechnologies> > <http://www.linkedin.com/company/1372?goback=.cps_1244823420724_1> > <https://plus.google.com/+CATechnologies> > <http://www.ca.com/us/rss.aspx?intcmp=footernav>
