Hello,

I am currently attempting to test out the views feature of Calcite.

I am using a connection string like so:
jdbc:calcite:lex=JAVA;model=inline:<json model>

I have created a JdbcSchema that is attached to an actual database - lets
call it "t1". I can successfully run the query "select * from t1.table
limit 10"

I then created another schema, defined like so:
{
    "name": "viewtest",
    "tables": [
        { "name": "test_view", "type": "view", "sql": "select * from
t1.table limit 10" }
     ]
}

The idea is to set up connections to a bunch of physical data sources and
then have a "views" schema that just contains views over them.

However, when attempting to run the query "select * from
viewtest.test_view", I get the following exception:

StatementCallback; uncategorized SQLException for SQL [select * from
viewtest.test_view]; SQL state [null]; error code [0];
Error while executing SQL \"select * from viewtest.test_view\": From line
1, column 15 to line 1, column 32: Object 'T1' not found; did you mean 't1'?

I can clearly see that lex=JAVA is not being used for the view and the
default lex=ORACLE is being used. If I change the view SQL to 'select *
from "t1".table limit 10' it works - but I don't want to have to quote the
identifiers oracle style, I would like the lex=JAVA that I specified on the
connection string to flow down to views as well.

What am I missing here?

Cheers,
Erin

Reply via email to