Hi Calcite Developers,

I am working on a requirement where user queries to RDMS database and
under the hood, Calcite will send back the data from JSON, not from RDMS.

For this, I have added below code snippet in CalciteStatement execute
method to add CSV schema runtime.

sample code :

 final Schema schema =
        CsvSchemaFactory.INSTANCE
            .create(connection.getRootSchema(), null,
                ImmutableMap.of("directory",
                    "EMPS.json", "flavor", "scannable"));

  connection.getRootSchema().add("mycsv", schema);

So, when the user query "SELECT * FROM <RDMS>.EMPS" converts to
"SELECT * FROM \"mycsv\".EMPS"

The above code says  *package org.apache.calcite.adapter.csv does not
exist,*

I am trying to fix it for 5 hours.
How to do this?

Regards,
Kartik

Reply via email to