Looks good, except that I’d change > "defaultSchema": "SALES Samplepostgres”,
to > "defaultSchema": "SALES”, Julian > On Oct 2, 2017, at 2:38 PM, AshwinKumar AshwinKumar <[email protected]> > wrote: > > Sorry this is the proper json file - > > { > "version": "1.0", > "defaultSchema": "SALES Samplepostgres", > "schemas": [ > { > "name": "SALES", > "type": "custom", > "factory": "org.apache.calcite.adapter.csv.CsvSchemaFactory", > "operand": { > "directory": "sales" > } > }, > { > "name": "Samplepostgres", > "type": "custom", > "factory": "org.apache.calcite.adapter.jdbc.JdbcSchema$Factory", > "operand": { > "jdbcDriver": "org.postgresql.Driver", > "jdbcUrl": "jdbc:postgresql://localhost/bigdawg_catalog", > "jdbcUser": "pguser", > "jdbcPassword": "test" > } > } > ] > > > Thanks, > Ashwin > > On Mon, Oct 2, 2017 at 10:37 PM, AshwinKumar AshwinKumar < > [email protected]> wrote: > >> Hi , >> >> Do you mean to say, I need to change the model.json file present in the >> examples directory. I have edited the existing model.json file present in >> the example/csv/target/test-classes to include the postgres schema . But >> I am not able to connect . Below is the edited json just to include >> postgres - >> >> { >> "version": "1.0", >> "defaultSchema": "SALES Samplepostgres", >> "schemas": [ >> { >> "name": "SALES", >> "type": "custom", >> "factory": "org.apache.calcite.adapter.csv.CsvSchemaFactory", >> "operand": { >> "directory": "sales" >> } >> }, >> { >> "name": "Samplepostgres", >> "type": "custom", >> "factory": "org.apache.calcite.adapter.jdbc.JdbcSchema$Fac{ >> "version": "1.0", >> "defaultSchema": "SALES Samplepostgres", >> "schemas": [ >> { >> "name": "SALES", >> "type": "custom", >> "factory": "org.apache.calcite.adapter.csv.CsvSchemaFactory", >> "operand": { >> "directory": "sales" >> } >> }, >> { >> "name": "Samplepostgres", >> "type": "custom", >> "factory": "org.apache.calcite.adapter.jdbc.JdbcSchema$Factory", >> "operand": { >> "jdbcDriver": "org.postgresql.Driver", >> "jdbcUrl": "jdbc:postgresql://localhost/bigdawg_catalog", >> "jdbcUser": "pguser", >> "jdbcPassword": "test" >> } >> } >> ] >> } >> tory", >> "operand": { >> "jdbcDriver": "org.postgresql.Driver", >> "jdbcUrl": "jdbc:postgresql://localhost/bigdawg_catalog", >> "jdbcUser": "pguser", >> "jdbcPassword": "test" >> } >> } >> ] >> } >> >> Could you please let me know if it is correct. I am getting an error - >> >> sqlline version 1.3.0 >> sqlline> select * from table3; >> No current connection >> >> The table table3 is present in the postgres database. >> >> Thanks, >> Ashwin >> >> >> >> >> >> On Mon, Oct 2, 2017 at 7:59 PM, Julian Hyde <[email protected]> wrote: >> >>> Easiest thing is to create a JSON model file with two schemas in it. >>> >>> https://calcite.apache.org/docs/model.html <https://calcite.apache.org/do >>> cs/model.html> >>> >>> https://calcite.apache.org/docs/adapter.html < >>> https://calcite.apache.org/docs/adapter.html> >>> >>> >>>> On Oct 2, 2017, at 11:48 AM, AshwinKumar AshwinKumar < >>> [email protected]> wrote: >>>> >>>> Could you please give me some pointers for where can I get some >>>> documentation or links on how to connect elastisearch and postgres in >>> same >>>> query. >>>> As we know Elastisearch has a separate adapter and postgres comes under >>>> jdbc adapter. Do we need to create a root schema using jdbc adapter for >>>> elastisearch instance. >>>> >>>> Thanks, >>>> Ashwin >>>> >>>> On Mon, Oct 2, 2017 at 2:44 PM, Julian Hyde <[email protected]> wrote: >>>> >>>>> Yes, you should be able to combine any data source with any other data >>>>> source in a query. >>>>> >>>>> Julian >>>>> >>>>>> On Oct 2, 2017, at 11:40 AM, AshwinKumar AshwinKumar < >>>>> [email protected]> wrote: >>>>>> >>>>>> Hello Team, >>>>>> >>>>>> I had a question regarding connecting Elastisearch and Postgres >>> Database >>>>> in >>>>>> a single query. Could you please let me know If we can query a >>>>> elastisearch >>>>>> type(table) and a postgres table in the same query. >>>>>> >>>>>> Thanks, >>>>>> Ashwin >>>>> >>>>> >>> >>> >>
