Class CloneSchema.Factory

java.lang.Object
org.apache.calcite.adapter.clone.CloneSchema.Factory
All Implemented Interfaces:
SchemaFactory
Enclosing class:
CloneSchema

public static class CloneSchema.Factory extends Object implements SchemaFactory
Schema factory that creates a CloneSchema. This allows you to create a clone schema inside a model.json file.
 {
   version: '1.0',
   defaultSchema: 'FOODMART_CLONE',
   schemas: [
     {
       name: 'FOODMART_CLONE',
       type: 'custom',
       factory: 'org.apache.calcite.adapter.clone.CloneSchema$Factory',
       operand: {
         jdbcDriver: 'com.mysql.jdbc.Driver',
         jdbcUrl: 'jdbc:mysql://localhost/foodmart',
         jdbcUser: 'foodmart',
         jdbcPassword: 'foodmart'
       }
     }
   ]
 }
  • Constructor Details

    • Factory

      public Factory()
  • Method Details

    • create

      public Schema create(SchemaPlus parentSchema, String name, Map<String,Object> operand)
      Description copied from interface: SchemaFactory
      Creates a Schema.
      Specified by:
      create in interface SchemaFactory
      Parameters:
      parentSchema - Parent schema
      name - Name of this schema
      operand - The "operand" JSON property
      Returns:
      Created schema