[jira] [Updated] (CALCITE-1259) Allow connecting to a single schema without writing a model

2016-05-29 Thread Julian Hyde (JIRA)

 [ 
https://issues.apache.org/jira/browse/CALCITE-1259?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Julian Hyde updated CALCITE-1259:
-
Fix Version/s: 1.8.0

> Allow connecting to a single schema without writing a model
> ---
>
> Key: CALCITE-1259
> URL: https://issues.apache.org/jira/browse/CALCITE-1259
> Project: Calcite
>  Issue Type: Bug
>Reporter: Julian Hyde
>Assignee: Julian Hyde
> Fix For: 1.8.0
>
>
> Allow connecting to a single schema without writing a model. Currently, to 
> use a SchemaFactory you need to write a model.json file, but with this 
> feature, you could specify the same information as connect string parameters.
> Examples
> 1. JDBC (built-in). Instead of writing a model with
> {code}
>  {
> type: 'jdbc',
> name: 'FOODMART',
> jdbcUser: 'FOODMART',
> jdbcPassword: 'FOODMART',
> jdbcUrl: 'jdbc:hsqldb:res:foodmart',
> jdbcSchema: 'foodmart'
>   }
> {code}
> use the connect string {{jdbc:calcite:schema_type=jdbc; 
> schema.jdbcUser=FOODMART; schema.jdbcPassword=FOODMART; 
> schema.jdbcUrl='jdbc:hsqldb:res:foodmart'; schema.jdbcSchema=foodmart}}
> 2. Mongo (user-defined). Instead of writing a model with
> {code}
>   {
>   type: 'custom',
>   name: 'mongo_raw',
>   factory: 'org.apache.calcite.adapter.mongodb.MongoSchemaFactory',
>   operand: {
> host: 'localhost',
> database: 'test'
>   }
> }
> {code}
> use the connect string 
> {{jdbc:calcite:schemaFactory=org.apache.calcite.adapter.mongodb.MongoSchemaFactory;
>  schema.host=localhost; schema.database=test}}
> 3. Cassandra (user-defined). Instead of writing a model with
> {code}
>   {
>   type: 'custom',
>   name: 'twissandra',
>   factory: 'org.apache.calcite.adapter.cassandra.CassandraSchemaFactory',
>   operand: {
> host: 'localhost',
> keyspace: 'twissandra'
>   }
> }
> {code}
> use the connect string 
> {{jdbc:calcite:schemaFactory=org.apache.calcite.adapter.cassandra.CassandraSchemaFactory;
>  schema.host=localhost; schema.keyspace=twissandra}}
> You can supply any operand supported by the adapter, as long as you prefix 
> its name with "schema.".



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CALCITE-1259) Allow connecting to a single schema without writing a model

2016-05-28 Thread Julian Hyde (JIRA)

 [ 
https://issues.apache.org/jira/browse/CALCITE-1259?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Julian Hyde updated CALCITE-1259:
-
Description: 
Allow connecting to a single schema without writing a model. Currently, to use 
a SchemaFactory you need to write a model.json file, but with this feature, you 
could specify the same information as connect string parameters.

Examples

1. JDBC (built-in). Instead of writing a model with

{code}
 {
type: 'jdbc',
name: 'FOODMART',
jdbcUser: 'FOODMART',
jdbcPassword: 'FOODMART',
jdbcUrl: 'jdbc:hsqldb:res:foodmart',
jdbcSchema: 'foodmart'
  }
{code}

use the connect string {{jdbc:calcite:schema_type=jdbc; 
schema.jdbcUser=FOODMART; schema.jdbcPassword=FOODMART; 
schema.jdbcUrl='jdbc:hsqldb:res:foodmart'; schema.jdbcSchema=foodmart}}

2. Mongo (user-defined). Instead of writing a model with

{code}
  {
  type: 'custom',
  name: 'mongo_raw',
  factory: 'org.apache.calcite.adapter.mongodb.MongoSchemaFactory',
  operand: {
host: 'localhost',
database: 'test'
  }
}
{code}

use the connect string 
{{jdbc:calcite:schemaFactory=org.apache.calcite.adapter.mongodb.MongoSchemaFactory;
 schema.host=localhost; schema.database=test}}

3. Cassandra (user-defined). Instead of writing a model with

{code}
  {
  type: 'custom',
  name: 'twissandra',
  factory: 'org.apache.calcite.adapter.cassandra.CassandraSchemaFactory',
  operand: {
host: 'localhost',
keyspace: 'twissandra'
  }
}
{code}

use the connect string 
{{jdbc:calcite:schemaFactory=org.apache.calcite.adapter.cassandra.CassandraSchemaFactory;
 schema.host=localhost; schema.keyspace=twissandra}}

You can supply any operand supported by the adapter, as long as you prefix its 
name with "schema.".

  was:
Allow connecting to a single schema without writing a model. Currently, to use 
a SchemaFactory you need to write a model.json file, but with this feature, you 
could specify the same information as connect string parameters.

Examples

1. JDBC (built-in). Instead of writing a model with

{code}
 {
type: 'jdbc',
name: 'FOODMART',
jdbcUser: 'FOODMART',
jdbcPassword: 'FOODMART',
jdbcUrl: 'jdbc:hsqldb:res:foodmart',
jdbcSchema: 'foodmart'
  }
{code}

use the connect string {{jdbc:calcite:schema_type=jdbc; 
schema_jdbcUser=FOODMART; schema_jdbcPassword=FOODMART; 
schema_jdbcUrl='jdbc:hsqldb:res:foodmart'; schema_jdbcSchema=foodmart}}

2. Mongo (user-defined). Instead of writing a model with

{code}
  {
  type: 'custom',
  name: 'mongo_raw',
  factory: 'org.apache.calcite.adapter.mongodb.MongoSchemaFactory',
  operand: {
host: 'localhost',
database: 'test'
  }
}
{code}

use the connect string 
{{jdbc:calcite:schemaFactory=org.apache.calcite.adapter.mongodb.MongoSchemaFactory;
 schema_host=localhost; schema_database=test}}

3. Cassandra (user-defined). Instead of writing a model with

{code}
  {
  type: 'custom',
  name: 'twissandra',
  factory: 'org.apache.calcite.adapter.cassandra.CassandraSchemaFactory',
  operand: {
host: 'localhost',
keyspace: 'twissandra'
  }
}
{code}

use the connect string 
{{jdbc:calcite:schemaFactory=org.apache.calcite.adapter.cassandra.CassandraSchemaFactory;
 schema_host=localhost; schema_keyspace=twissandra}}


> Allow connecting to a single schema without writing a model
> ---
>
> Key: CALCITE-1259
> URL: https://issues.apache.org/jira/browse/CALCITE-1259
> Project: Calcite
>  Issue Type: Bug
>Reporter: Julian Hyde
>Assignee: Julian Hyde
>
> Allow connecting to a single schema without writing a model. Currently, to 
> use a SchemaFactory you need to write a model.json file, but with this 
> feature, you could specify the same information as connect string parameters.
> Examples
> 1. JDBC (built-in). Instead of writing a model with
> {code}
>  {
> type: 'jdbc',
> name: 'FOODMART',
> jdbcUser: 'FOODMART',
> jdbcPassword: 'FOODMART',
> jdbcUrl: 'jdbc:hsqldb:res:foodmart',
> jdbcSchema: 'foodmart'
>   }
> {code}
> use the connect string {{jdbc:calcite:schema_type=jdbc; 
> schema.jdbcUser=FOODMART; schema.jdbcPassword=FOODMART; 
> schema.jdbcUrl='jdbc:hsqldb:res:foodmart'; schema.jdbcSchema=foodmart}}
> 2. Mongo (user-defined). Instead of writing a model with
> {code}
>   {
>   type: 'custom',
>   name: 'mongo_raw',
>   factory: 'org.apache.calcite.adapter.mongodb.MongoSchemaFactory',
>   operand: {
> host: 'localhost',
> database: 'test'
>   }
> }
> {code}
> use the connect string 
> {{jdbc:calcite:schemaFactory=org.apache.calcite.adapter.mongodb.MongoSchemaFactory;
>  schema.host=localhost; schema.database=test}}
> 3. Cassandra