show

The show operator produces a result array whose contents describe the schema of an array you supply.

Synopsis

show(named_array);
or

show('query'[,'afl']);

Summary

The show operator returns an array's schema as well as its distribution and empty tag compression. The argument named_array must be an array that was previously created and stored in SciDB.

You can use the show operator to return the schema for a query. This lets you preview the schema for a query, instead of having to first save the result of the query to an array. Use the optional string, 'afl', for AFL queries.

You can also use the show operator in the FROM clause of an AQL SELECT statement, as a stand-alone operator in a AFL statement, or as an operand within other SciDB operators.

If you supply a query string containing a redimension operator with unspecified chunk sizes, the schema show returns may itself have unspecified chunk sizes (shown as asterisk, '*'). See redimension for details.

Examples

Show the Schema of an Existing Array

  1. Create an array 'A'.

    AFL% store(build(<val1:double>[i=0:4; j=0:0], i),A);


    The output is:

    {i,j} val1
    {0,0} 0
    {1,0} 1
    {2,0} 2
    {3,0} 3
    {4,0} 4


  2. Show the schema of array 'A'.

    AFL% show(A);


    The output is:

    {i} schema,distribution,etcomp
    {0} 'A<val1:double>[i=0:4:0:1000; j=0:0:0:1000]','hashed',none

Show the Schema of a Query's Results without Actually Running the Query

  1. Show the schema of the same query above, without storing into array A first.

    AFL% show('build(<val1:double>[i=0:4; j=0:0], i)', 'afl');


    The output is:

    {i} schema,distribution,etcomp
    {0} 'build<val1:double>[i=0:4:0:1000; j=0:0:0:1000]','hashed','none'