public static class JdbcSchema.Factory extends Object implements SchemaFactory
JdbcSchema.
This allows you to create a jdbc schema inside a model.json file, like this:
{
"version": "1.0",
"defaultSchema": "FOODMART_CLONE",
"schemas": [
{
"name": "FOODMART_CLONE",
"type": "custom",
"factory": "org.apache.calcite.adapter.jdbc.JdbcSchema$Factory",
"operand": {
"jdbcDriver": "com.mysql.jdbc.Driver",
"jdbcUrl": "jdbc:mysql://localhost/foodmart",
"jdbcUser": "foodmart",
"jdbcPassword": "foodmart"
}
}
]
}| Modifier and Type | Field and Description |
|---|---|
static JdbcSchema.Factory |
INSTANCE |
| Modifier | Constructor and Description |
|---|---|
private |
Factory() |
| Modifier and Type | Method and Description |
|---|---|
Schema |
create(SchemaPlus parentSchema,
String name,
Map<String,Object> operand)
Creates a Schema.
|
public static final JdbcSchema.Factory INSTANCE
public Schema create(SchemaPlus parentSchema, String name, Map<String,Object> operand)
SchemaFactorycreate in interface SchemaFactoryparentSchema - Parent schemaname - Name of this schemaoperand - The "operand" JSON propertyCopyright © 2012–2018 The Apache Software Foundation. All rights reserved.