Re: Provide model.json file from Resources in Jar
I think calcite supports inline: prefix in properties (for models). Try to
add the following to properties:
Properties props = new Properties();
prop.put("model", "inline:" + longString);
On Mon, Oct 29, 2018 at 3:00 PM Julian Hyde <jhyde@xxxxxxxxxx> wrote:
> I thought there was a way to read models from jars. I don’t think we have
> a “resource:” prefix. I think you need to use the path within the jar, e.g.
> Look at the tests, there are probably some clues there.
> > On Oct 26, 2018, at 4:51 AM, ptr.bojko@xxxxxxxxx wrote:
> > Hello,
> > use:
> > connection =
> > in method getPropertied provide:
> > property *user* and *password*
> > property *inline* with your schema loaded from resource as a string.
> > Regards
> > On Fri, Oct 26, 2018 at 1:46 PM Shashwat Kumar <
> > wrote:
> >> Hi,
> >> I am trying to bundle model.json file inside the Java Jar. However
> >> doesn't seem to have a way to provide path from resources folder,
> >> like:
> >> connection =
> >> DriverManager.getConnection("jdbc:calcite:model=resource:model.json",
> >> "admin", "admin");
> >> It there some way to do so or some existing workaround?
> >> --
> >> Regards
> >> Shashwat Kumar
> > --
> > Piotr Bojko
> > http://about.me/ptr.bojko