Command reference#
This section contains a list of line magic and cell magic commands for iris.
Line magic commands#
%ten_advanced_settings
#
Invoke the Advanced Settings dialog in the 1010data GUI.
%ten_clearcache
#
Delete the server-side subprocesses and the cache of the main process associated with your session.
%ten_clearcache --session-name MYSESSION
|
Optional name of the session created in |
%ten_company_manager
#
Invoke the Company Manager dialog in the 1010data GUI.
%ten_config
#
Configure global options.
%ten_config --timing-output False --xmllog logfile.txt --session-name mysession --sub-variables True
|
Set to |
|
Set to |
|
The session name created in |
|
Set the name of the transaction log file. |
|
Set to |
%ten_dir
#
List objects (directories, tables, queries). If no directory is specified using --dir
, the root directory is listed by default. Throws a NameError
if there are no active sessions.
%ten_dir --dir MYDIR
|
Optional name of the session created in |
|
Clear the session cache before running the query. |
|
Set the directory when running the query. |
|
Assign results of the query as a |
|
Assign results of the query as a pandas |
|
Use with |
|
Use with |
|
Use with |
|
Specify the HTML |
|
Specify the HTML |
%ten_filter_manager
#
Invoke the Filter Manager dialog in the 1010data GUI.
%ten_get_config
#
Display current values for configuration options, including timing output (True
or False
), resizable grid (True
or False
), allow variable substitution (True
or False
), and the name of the transaction log file, if there is one.
%ten_get_ses
#
Access a session created through %ten_login
. Throws a NameError
if there are no active sessions.
|
Optional name of the session created in |
%ten_group_manager
#
Invoke the Group Manager dialog in the 1010data GUI.
%ten_help
#
Output command line help.
%ten_iris_version
#
Return information about the iris version.
%ten_login
#
Log in to 1010data to start a session.
%ten_login -g https://www2.corp.1010data.com/beta-latest/gw -u USERNAME --possess --xmllog log.txt
|
The gateway of the 1010data Insights Platform to connect to, such as https://www2.1010data.com/gw. |
|
The user name. |
|
Optional password. If not supplied, iris prompts for a password. |
|
Option to end an existing active session and start a new session. |
|
Option to possess a session if it exists. |
|
Option to write a transaction log. |
|
Option to provide a session name for the session. |
%ten_role_manager
#
Invoke the Role Manager dialog in the 1010data GUI.
%ten_scheduler
#
Invoke the 1010data Scheduler in the 1010data GUI.
%ten_server_py_version
#
Return the server-side Python version.
%ten_server_r_version
#
Return the server-side R version.
%ten_set_ses
#
Set a py1010.Session
object representing an active 1010data session.
Warning
%ten_set_ses
will overwrite active sessions. Check the session with %ten_get_ses
first.
|
Provide an active |
|
Assign the session object to a specific session when there is more than one active session. |
%ten_user_manager
#
Invoke the User Manager dialog in the 1010data GUI.
%ten_user_profile
#
Invoke the User Profile dialog in the 1010data GUI.
%ten_wsmeter
#
Check current memory usage of this session.
%ten_recent_sessions
#
Get information about this user's recent sessions.
%ten_trs
#
Browse data and build queries.
%ten_ppa
#
Analyze performance of previously run queries.
%ten_sql_metadata_tool
#
Set up the SQL schema for your user ID.
%ten_table_importer
#
Import an external table.
%ten_tag_inspector
#
Check which tags can be used to access API2 query results. (Useful with ten_quickapp_profiler)
%ten_quickapp_profiler
#
Lookup performance information about your quickapp using it's tag. (Useful with ten_tag_inspector)
Cell magic commands#
%%ten_py_stream
#
Run a block of python code in your session's server-side process. Returns an HTML grid widget representing results, or a TenFrame
if --tenframe
is used, or a pandas DataFrame
if --pandas
is used. Throws a NameError
if there are no active sessions.
%%ten_py_stream --session-name mysession
...
PYTHON CODE
...
|
Option to provide a session name for the session. |
|
Name of the table to return. |
|
Clear the session cache before running the query. |
|
Assign results of the query as a |
|
Assign results of the query as a pandas |
|
Use with |
|
Use with |
|
Use with |
|
Specify the HTML |
|
Specify the HTML |
%ten_query
or %%ten_query
#
Run a 1010data Macro Language query.
To run a simple query:
%ten_query --session-name mysession --base pub.demo.retail.item
To run a longer query:
%%ten_query --session-name mysession
...
MACRO LANGUAGE CODE
...
|
Optional name of the session created in %ten_login. |
|
Name of the table to return. |
|
Clear the session cache. |
|
The name of the |
|
The name of the |
|
The number of rows to download as a pandas |
|
Use with |
|
Use with |
|
Specify the HTML |
|
Specify the HTML |
%%ten_quickapp
#
Run a 1010data Macro Language QuickApp. Throws a NameError
if there are no active sessions.
%%ten_quickapp --session-name mysession
...
QUICKAPP CODE
...
|
Optional name of the session created in |
|
Clear the session cache. |
|
Specify the HTML |
|
Specify the HTML |
%%ten_r_stream
#
Run a block of R code in your session's server-side process. Returns an HTML grid widget representing results, or a TenFrame
if --tenframe
is used, or a pandas DataFrame
if --pandas
is used. Throws a NameError
if there are no active sessions.
%%ten_r_stream --session-name mysession
...
R CODE
...
|
Option to provide a session name for the session. |
|
Name of the table to return. |
|
Clear the session cache before running the query. |
|
Assign results of the query as a |
|
Assign results of the query as a pandas |
|
Use with |
|
Use with |
|
Use with |
|
Specify the HTML |
|
Specify the HTML |
%%ten_save_query
#
Save a 1010data Macro Language query as a Quick Query to the database.
%%ten_save_query --path mypath
...
MACRO LANGUAGE CODE
...
|
The 1010data database path at which to save the query. |
|
If a Quick Query already exist at |
|
The title of the saved Quick Query. |
|
The short description of the saved Quick Query. |
|
The long description of the saved Quick Query. |
|
The authorized users for the saved Quick Query. Options are |
|
Run the Quick Query being saved. |
|
Optional name of the session created in %ten_login. |
|
Name of the table to return. |
|
Clear the session cache. |
|
The name of the |
|
The name of the |
|
The number of rows to download as a pandas |
|
Use with |
|
Use with |
|
Specify the HTML |
|
Specify the HTML |
%%ten_sql
#
Run a SQL query. Returns an HTML grid widget representing results, or a TenFrame
if --tenframe
is used, or a pandas DataFrame
if --pandas
is used. Throws a NameError
if there are no active sessions.
%%ten_sql --session-name mysession
...
SQL CODE
...
|
Option to provide a session name for the session. |
|
Name of the table to return. |
|
Clear the session cache before running the query. |
|
Assign results of the query as a |
|
Assign results of the query as a pandas |
|
Use with |
|
Use with |
|
Use with |
|
Specify the HTML |
|
Specify the HTML |
%%ten_uploader
#
Invoke the Table Uploader GUI application.