list
The list operator lists contents of the SciDB database.
Synopsis
list(element [,version_flag] [,namespace: namespace_name])
Summary
The list operator retrieves a list of elements in the current SciDB database. The input is one of the following strings:
element | Show all operators that take as input a SciDB array and return a scalar. |
---|---|
aggregates | Show all aggregation functions, their input types, and the libraries in which they reside. |
arrays | Show all arrays.  This is the default if no element string is specified. If version_flag is true, the operator lists all versions of each array, so that if an array has n versions, the output includes n+1 rows for that array. If the namespace: keyword parameter is given, only the arrays in the specified namespace are listed.  The reserved namespace name all can be used to list all arrays in all namespaces. The namespace: keyword can be abbreviated as ns: . Namespaces are only available in Enterprse Edition. |
datastores | Show data on how arrays consume disk space in the cluster. |
functions | Show all functions and the libraries in which they reside. |
instances | Show all SciDB instances. Each instance appears with its port, id number, and the time and date when it came online. |
libraries | Show all loaded libraries in the current SciDB session, and the SciDB version information. For each instance, this parameter returns the SciDB version information, and the version information for each library that is loaded for that instance. |
macros | Show all available macros in the current SciDB session. The result array includes one cell for each system macro and one cell for each macro you loaded with load_module(). The result array has one dimension ("No") and two attributes: name and type. The value of type shows the input parameters of the macro. |
namespaces | Show all namespaces you have permission to view. |
operators | Show all operators and the libraries in which they reside. |
queries | Show all active queries. The number of cells in the result typically exceeds the number of active queries, because each SciDB instance reports each query it is processing. Each cell of the result shows the reporting instance, an arbitrary value for dimension n, the query_id, the coordinating instance for the query, the query string, the creation time, any applicable error code, the error status, the idle flag (a boolean where TRUE means that the query is idle), and the id and name of the user issuing the query. If SciDB is in security mode, you can only see your own queries unless you have operator privilege. Note that, for a given query, the query_id is the same on all instances. Likewise, for a given transaction, the transaction_id is the same on all instances. |
roles | List all roles currently in SciDB. (Operator privilege is required.) |
transactions | List active transactions and the locks they hold. Alias: list('txns'). |
types | Show all the data types the SciDB supports. |
users | Show all usernames recognized by SciDB. (Operator privilege is required.) |
Invoking the list operator without an argument, list(), is equivalent to passing in the 'arrays' string. That is, the following statements are equivalent:
%AFL list(); %AFL list('arrays');
Example
To see the sample output from the list operator, do the following:
List all arrays in all namespaces for which you have list permission:
AFL% list(ns: all);
The output is:{No} name,uaid,aid,schema,availability,temporary,namespace,distribution,etcomp
List all macros:
AFL% project(list('macros'), name);Â
The output is:{No} name {0} 'func_max' {1} 'func_min' {2} 'load' {3} 'op_avg' {4} 'op_count' {5} 'op_distinct_count' {6} 'op_max' {7} 'op_min' {8} 'op_now' {9} 'op_range' {10} 'op_scidbversion' {11} 'op_set_cell_attr_1D' {12} 'op_set_cell_attr_2D' {13} 'op_stdev' {14} 'op_sum' {15} 'redistribute'