For posterity's sake and future-searchers, I just hit this error again
under different circumstances and wanted to share why here.
The value of the second parameter ("name") to "JdbcSchema.create()" is
apparently very important.
Somehow I was passing something that was causing it to look for
Ahhh -- thanks for the code sample Gunnar and the clarification that you
can do it two ways Julian.
Data-source metadata updates should be infrequent
I can try to use a mutex/arc for the global SchemaPlus
Think it would be really beneficial to have a single schema tree that can
see every data
Gunnar’s point is a good one. To make it a little more explicit: if the value
of the the “model” parameter starts with “inline:”, the model is just the rest
of the string.
As to whether you use models or deal with the SchemaPlus API directly. It’s
your decision based on how much concurrency
Am Mo., 3. Jan. 2022 um 20:44 Uhr schrieb Gavin Ray :
> @Stamatis
>
> Thank you, I actually did not know that! That's useful information to
> have =)
>
> @Julian
>
> Is it possible to programmatically generate the JSON model? Why I ask is
> because part of the functionality I'm trying to mirror
@Stamatis
Thank you, I actually did not know that! That's useful information to
have =)
@Julian
Is it possible to programmatically generate the JSON model? Why I ask is
because part of the functionality I'm trying to mirror is the ability to add
data sources dynamically while the app server is
> Will try to figure out how to manually perform the process of creating a
> proper "Connection" object and adding the schemas to it.
Generally the best way is to write a JSON model, and then create a connection
using ‘jdbc:calcite:…model=...'. For that to work, your component needs to
Hi Gavin,
Although the problem was not related to generated code in the end it is
useful to know that you can debug into generated classes by setting some
system properties [1].
You can also use -Dcalcite.debug property which prints generated code among
other things to stdout.
You may have
Ahh, thank you Julian, appreciate that you're always answering my questions.
That all makes sense. I suppose the downside of using these incredibly handy
test helpers/utils is that I haven't a clue what's actually going on, haha.
Will try to figure out how to manually perform the process of
Gavin,
The reason is that you need two “ingredients” to execute a query. You need the
expression, and you need a connection. The expression is written in terms of
relations, which have a fully-qualified path, “schema.subSchema.tableName”. But
only the connection (to be precise, its root
After two days of banging my head against the wall, I figured it out!
It only works if I run the query in the context of a "CalciteConnection",
and I use "connection.unwrap()" to create the "RelRunner".
WRONG:
==
val run = RelRunners.run(bestExp)
val resultSet =
It appears to be because "getSubSchema" in
"calcite.jdbc.CalciteSchema.SchemaPlusImpl" has a "subSchemaMap" that loses
the "hr" schema and only contains "metadata" [0]
But if I call the same function the map shows "hr" is present [1] which
doesn't make sense to me
[0]: https://imgur.com/djlkBVf
Unsure of where this is coming from/how to debug it.
(The code I am using is below, taken from Calcite examples)
If I print out the sub-schema names of "rootSchema", and their tables, I
get:
subSchemaNames: [hr, metadata]
"hr" subSchema table names: [depts, emps]
"metadata" subSchema
12 matches
Mail list logo