execute Method
Description
Executes the specified command.
This method is used to extend the basic functionality of the other client methods.
Currently, the NoSQL backend supports an
Syntax
execute(backend, table, command=""
The method has additional parameters that aren't currently supported for the NoSQL backend. Therefore, when calling the method, be sure to explicitly specify the names of all parameters after
Parameters and Data Members
- backend
The backend type —
"nosql"
or"kv"
for the NoSQL backend. See Backend Types.- Type:
str
- Requirement: Required
- Type:
- table
The relative path to the backend data — a directory in the target data container (as configured for the client object) that represents a NoSQL table. For example,
"mytable"
or"examples/nosql/my_table"
.- Type:
str
- Requirement: Required
- Type:
- command
The command to execute.
- Type:
str
- Requirement: Required
- Valid Values: The NoSQL backend currently supports an
"infer_schema" or"infer" command, which infers the schema of a given NoSQL table and creates a schema for the table. The command creates a.#schema file in the table directory. For more information, see Table Schema in the Frames NoSQL backend overview. All references to theinfer_schema command in the documentation apply also to theinfer alias.
- Type:
Examples
infer_schema Examples
Following are examples of using the
-
Infer the schema of a
mytable table in the client's data container (table ) using theinfer command (command ):client.execute(backend="nosql", table="mytable", command="infer")
-
Infer the schema of a
my_tables/students table in the client's data container (table ) usinginfer_schema (command ):client.execute("nosql", table="/my_tables/students", command="infer_schema")