Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 2 Administering ActiveSpaces with the Admin CLI : alter space

alter space
Admin CLI Command
Syntax
alter space name <string> add (field name <string> type <string> [nullable <boolean>] (, field name <string> type <string> [nullable <boolean>])*)
|
alter space name <string> add index ( name <string> [type <string>] fields (<string> (, <string>)*))
|
alter space name <string> drop index (<index_name> (, <index_name>)*)
Purpose
Use alter space to add a field to an existing space definition, or to add or drop an index from a space definition.
Parameters
The following table describes the parameters for this command.
name specifies the name of the field to be added.
type specifies the data type for the field. Must be one of the following: boolean, char, short, integer, long, float, double, string, datetime, blob.
nullable is optional when adding a field. If you do not specify the nullable parameter, the field is by default not nullable. If you enter nullable, you must enter nullable true.
name specifies the name of the index.
type specifies the type of the index, which can be hash or tree.
fields specifies the fields to be used in the index.
Examples
Examples for add field:
alter space name “myspace” add (field name “average” type “double”)
alter space name “myspace” add (field name “average” type “double” nullable true)
alter space name “myspace” add (field name “average” type “double”, field name “total” type “long” nullable true)
Examples for add index:
alter space add index (name “index1” type “hash” fields(“a”, “b”, “c”))
alter space add index (name “index1” type “hash” fields(“a”, “b”, “c”)) index (name “index2” type “hash” fields(“a”, “b”, “c”))
Examples for drop index:
alter space drop index (“index1”)
alter space drop index (“index1”, “index2”)
Example for adding a field and an index:
alter space name “myspace” add (field name “average” type “double”) index (name “index1” type “hash” fields(“a”, “b”, “c”))
The parameters for fields and index use the following format:
fields: (field name “average” type “double”)
index: index (name “index1” type “hash” fields(“a”, “b”, “c”))
You can perform consecutive updates by adding one field after another.
 
You cannot add and drop an index in the same alter space command with as-admin. However, you can do this using the API operations. For an example showing how to do this with the Java API set, see Adding and dropping an index using the Java API in the TIBCO ActiveSpaces Developer’s Guide.

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved