redistribute

 The redistribute operator moves the array to various SciDB instances.

Synopsis

redistribute(named_array, distribution);

Summary

The distribution argument to the operator one of the following values:

  • all - this makes a copy of the array on every SciDB instance
  • an integer value corresponding to the instance id - forces all the array data onto that instance

 The argument named_array must be a previously-created and stored array in SciDB.

Example

To create an array, do the following:

AFL% store(build(<i:int64> [i=0:1012,13,3], random()), array1);

The following call copies array1 to all the instances so it is readily available for future queries.

AFL% redistribute(array1, 'all');  


The output is (essentially a 'scan' output):

{I} i
{0} 1283360183
{1} 477778792
{2} 2003907513
{3} 940506475
{4} 1795640860
{5} 896301590
. . .

To force the array to a single instance:

AFL% redistribute(array1, 1);  

The data from array1 now resides exclusively on instance 1.