I can’t quite tell whether Andreas wants to connect to Calcite via JDBC, or have Calcite’s adapter connect to a JDBC source.
For the former, there is not much variation in connect string parameters available. Any of the parameters can be put into the “info” map or included as part of the URL. So, using the “lex” property as an example, info.set(“lex”, “JAVA”); is the same as adding “&lex=JAVA” to the connect string. For the latter, as Michael says, there is a lot of variation among adapters. Julian > On Jul 28, 2020, at 7:31 AM, Michael Mior <[email protected]> wrote: > > 1) The options specified in the connection string are unique to the > specific adapter being used. > 2) Unfortunately, I don't believe such a summary exists. (Although > there is documentation on what can be in the model JSON file.) > 3) Configuring with the connecting string is fine where possible, but > some options cannot be configured this way. When you need to use one > of those options, it makes sense to move to a JSON configuration. > 4) No. Only simple options can be expressed as part of the connecting > string which may or may not be sufficient for your use case. > > -- > Michael Mior > [email protected] > > Le mar. 28 juil. 2020 à 04:01, Andreas Eberhart > <[email protected]> a écrit : >> >> Hi, >> >> I'm new in the Calcite Community (hope this is the right place to ask this >> kind of question). >> >> It found the following options to configure Calcite JDBC clients so far: >> >> This tutorial uses a JSON file: >> jdbc:calcite:model=src/test/resources/model.json >> https://calcite.apache.org/docs/tutorial.html >> https://github.com/apache/calcite/blob/master/example/csv/src/test/resources/model.json >> >> >> This StackOverflow answer uses options separated by semicolons directly in >> the JDBC URL: >> jdbc:calcite:schemaFactory=org.apache.calcite.adapter.csv.CsvSchemaFactory; >> schema.directory=/path/to/csv/files >> https://stackoverflow.com/questions/61695163/packaging-apache-calcite-csv-example-into-a-jdbc-driver >> >> >> The background page constructs schema pojos directly: >> https://calcite.apache.org/docs/ >> (I do not understand the purpose of the line "info.setProperty("lex", >> "JAVA")" in the code) >> >> Questions: >> >> 1) Are there other options? >> 2) Is there a summary of the different ways Calcite JDBC clients can be >> configured? >> 3) Is there a best practise? >> 4) Can every connection option be expressed in all mechanisms? >> >> Thanks! >> >> Andi
