TIBCO Data Virtualization® Adapter Online Help > TDV Elasticsearch Adapter > Data Model > Stored Procedures
 
Stored Procedures
Stored procedures are available to complement the data available from the Data Model. It may be necessary to update data available from a view using a stored procedure because the data does not provide for direct, table-like, two-way updates. In these situations, the retrieval of the data is done using the appropriate view or table, while the update is done by calling a stored procedure. Stored procedures take a list of parameters and return back a dataset that contains the collection of tuples that constitute the response.
Elasticsearch Adapter Stored Procedures
Name
Description
Creates a schema file for the collection.
Submits an alias request to modify index aliases.
CreateSchema
Creates a schema file for the collection.
Input
Name
Type
Description
SchemaName
String
The name of the schema (the Elasticsearch index).
TableName
String
The name of the collection (the Elasticsearch Type).
FileLocation
String
The folder path where the generated schema (RSD) file will be stored. When specified the TableName will be used as the schema file name.
FileName
String
The complete schema (RSD) file name of the generated schema. This input takes precedence of FileLocation.
Output
Name
Type
Description
Result
String
Returns Success or Failure.
ModifyIndexAliases
Submits an alias request to modify index aliases.

EXECUTE Example:
EXECUTE ModifyIndexAliases Action='add;add', Index='index_1;index_2', Alias='my_alias;my_alias'
Note: The Index parameter supports the asterisk (*) character to perform a pattern match to add all matching indices to the alias.
Input
Name
Type
Description
Action#
String
The action to perform such as 'add', 'remove', or 'remove_index'. Multiple actions are semi-colon separated.
Index#
String
The name of the index. Multiple indexes are semi-colon separated.
Alias#
String
The name of the alias. Multiple aliases are semi-colon separated.
Filter#
String
A filter to use when creating the alias. This takes the raw JSON filter using Query DSL. Multiple filters are semi-colon separated.
Routing#
String
The routing value to associate with the alias. Multiple routing values are semi-colon separated.
SearchRouting#
String
The routing value to associate with the alias for searching operations. Multiple search routing values are semi-colon separated.
IndexRouting#
String
The routing value to associate with the alias for indexing operations. Multiple index routing values are semi-colon separated.
Output
Name
Type
Description
Success
String
Returns True if successful.